From 48e509e19f9118f9c3fd7cefc4adedf98689e5ea Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Wed, 13 Nov 2024 05:34:46 -0800 Subject: [PATCH] fix: fixes broken minimum logs. see #3383 (#3384) --- internal/web/logs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/web/logs.go b/internal/web/logs.go index 8ced457847de..681aa75deb79 100644 --- a/internal/web/logs.go +++ b/internal/web/logs.go @@ -158,7 +158,7 @@ func (h *handler) fetchLogsBetweenDates(w http.ResponseWriter, r *http.Request) } encoder := json.NewEncoder(w) -outer: + for { if buffer.Len() > minimum { break @@ -199,7 +199,7 @@ outer: if lastSeenId != 0 && event.Id == lastSeenId { log.Debug().Uint32("lastSeenId", lastSeenId).Msg("found last seen id") - break outer + break } buffer.Push(event)