logtail: we missed a case for the backoff timer.

We want to run bo.Backoff() after every upload, regardless. If
upload==true but err!=nil, we weren't backing off, which caused some
very-high-throughput log upload retries in bad network conditions.

Updates #282.

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
This commit is contained in:
Avery Pennarun 2020-06-05 03:06:29 -04:00
parent 1d2e497d47
commit 6f590f5b52

View File

@ -273,10 +273,10 @@ func (l *logger) uploading(ctx context.Context) {
if err != nil {
fmt.Fprintf(l.stderr, "logtail: upload: %v\n", err)
}
l.bo.BackOff(ctx, err)
if uploaded {
break
}
l.bo.BackOff(ctx, err)
}
select {