Skip to content

Commit e71f8e4

Browse files
committed
Comments
1 parent 47e8af8 commit e71f8e4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

storage/internal/queue.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ func NewQueue(ctx context.Context, maxAge time.Duration, maxSize uint, f FlushFu
5959
defer close(batches)
6060

6161
var items []queueItem
62+
63+
// Initialise a timer with an arbitrarily large value, and immediately
64+
// call Stop() to avoid a spurious trigger on the first iteration.
6265
timer := time.NewTimer(time.Hour)
6366
timer.Stop()
6467

0 commit comments

Comments
 (0)