From 24f0e732462f939dfeea968089697961784b62b5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 29 May 2026 22:04:02 +0000 Subject: [PATCH] chore: clarify timestamp sorting comment --- web/job/check_client_ip_job.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/job/check_client_ip_job.go b/web/job/check_client_ip_job.go index b14aac01..47a06a21 100644 --- a/web/job/check_client_ip_job.go +++ b/web/job/check_client_ip_job.go @@ -260,8 +260,8 @@ func mergeClientIps(old, new []IPWithTimestamp, staleCutoff int64) map[string]in // mergeClientIps, and without this split it would keep triggering // fail2ban even though it isn't currently connected. see #4077 / #4091. // -// live is sorted ascending (oldest → newest), so we keep the most recent -// entries at the end of the slice (last IP wins). +// live is sorted ascending by timestamp (oldest → newest), so we keep +// 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) { live = make([]IPWithTimestamp, 0, len(observedThisScan)) historical = make([]IPWithTimestamp, 0, len(ipMap))