diff --git a/internal/timer/timer.go b/internal/timer/timer.go index 52936564..0c060fee 100644 --- a/internal/timer/timer.go +++ b/internal/timer/timer.go @@ -4,6 +4,9 @@ import ( "time" ) +// Stop the timer and drain the channel. +// Note that this should only be called if the channel hasn't already been +// drained or it may block indefinitely. func StopTimer(t *time.Timer) { if !t.Stop() { // Need to drain the timer if Stop() returns false