mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-09 20:29:23 +02:00
hotfix(boringpoll): fix debug log to log out last error
This commit is contained in:
@@ -91,8 +91,8 @@ func (b *BoringPoll) Start() (runError <-chan error, err error) {
|
|||||||
return
|
return
|
||||||
case <-timer.C:
|
case <-timer.C:
|
||||||
}
|
}
|
||||||
|
var n int64
|
||||||
n, err := fetchURL(ctx, b.client, url)
|
n, err = fetchURL(ctx, b.client, url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
consecutiveFails++
|
consecutiveFails++
|
||||||
continue
|
continue
|
||||||
@@ -101,7 +101,7 @@ func (b *BoringPoll) Start() (runError <-chan error, err error) {
|
|||||||
totalDownloaded += uint64(n) //nolint:gosec
|
totalDownloaded += uint64(n) //nolint:gosec
|
||||||
lastDownloaded += uint64(n) //nolint:gosec
|
lastDownloaded += uint64(n) //nolint:gosec
|
||||||
if lastDownloaded >= logEveryBytes {
|
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)
|
byteCountSI(totalDownloaded), url)
|
||||||
lastDownloaded = 0
|
lastDownloaded = 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user