mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-05 12:44:22 +00:00
chore: clarify timestamp sorting comment
This commit is contained in:
parent
996d467c50
commit
24f0e73246
1 changed files with 2 additions and 2 deletions
|
|
@ -260,8 +260,8 @@ func mergeClientIps(old, new []IPWithTimestamp, staleCutoff int64) map[string]in
|
||||||
// mergeClientIps, and without this split it would keep triggering
|
// mergeClientIps, and without this split it would keep triggering
|
||||||
// fail2ban even though it isn't currently connected. see #4077 / #4091.
|
// fail2ban even though it isn't currently connected. see #4077 / #4091.
|
||||||
//
|
//
|
||||||
// live is sorted ascending (oldest → newest), so we keep the most recent
|
// live is sorted ascending by timestamp (oldest → newest), so we keep
|
||||||
// entries at the end of the slice (last IP wins).
|
// the most recent entries at the end of the slice (last IP wins).
|
||||||
func partitionLiveIps(ipMap map[string]int64, observedThisScan map[string]bool) (live, historical []IPWithTimestamp) {
|
func partitionLiveIps(ipMap map[string]int64, observedThisScan map[string]bool) (live, historical []IPWithTimestamp) {
|
||||||
live = make([]IPWithTimestamp, 0, len(observedThisScan))
|
live = make([]IPWithTimestamp, 0, len(observedThisScan))
|
||||||
historical = make([]IPWithTimestamp, 0, len(ipMap))
|
historical = make([]IPWithTimestamp, 0, len(ipMap))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue