1
0
Fork 0

Stop timer before flushing

master
Philip O'Toole 1 year ago
parent b923c73838
commit b4880eee87

@ -208,6 +208,9 @@ func (q *Queue) run() {
writeFn()
case <-q.flush:
stats.Add(numFlush, 1)
if !timer.Stop() {
<-timer.C
}
writeFn()
case <-q.done:
timer.Stop()

Loading…
Cancel
Save