From 02a186c14520d80929cddf31d829166abdf52d11 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Sat, 7 Mar 2026 16:04:57 +0000 Subject: [PATCH] hotfix(boringpoll): fix debug log to log out last error --- internal/boringpoll/boringpoll.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/boringpoll/boringpoll.go b/internal/boringpoll/boringpoll.go index 4d9d7093..47abbe7f 100644 --- a/internal/boringpoll/boringpoll.go +++ b/internal/boringpoll/boringpoll.go @@ -91,8 +91,8 @@ func (b *BoringPoll) Start() (runError <-chan error, err error) { return case <-timer.C: } - - n, err := fetchURL(ctx, b.client, url) + var n int64 + n, err = fetchURL(ctx, b.client, url) if err != nil { consecutiveFails++ continue @@ -101,7 +101,7 @@ func (b *BoringPoll) Start() (runError <-chan error, err error) { totalDownloaded += uint64(n) //nolint:gosec lastDownloaded += uint64(n) //nolint:gosec if lastDownloaded >= logEveryBytes { - b.logger.Infof("thanks for helping! Downloaded %s from %s!", + b.logger.Infof("thanks for helping! You have downloaded %s from %s so far!", byteCountSI(totalDownloaded), url) lastDownloaded = 0 }