Skip to content

Properly drain the timer channel

Mikhail Mazurskiy requested to merge ash2k/timer-stop-bug into master

Relates to #386 (closed).

The timer might have fired just before we called Stop() and hence will trigger the <-t.C case on the next iteration. This is not the desired behavior.

Also, change code to reset the timer rather than create a new one each time to save GC some work.

Edited by Mikhail Mazurskiy

Merge request reports