Skip to content

Commit

Permalink
remove reading the channel. new timer behavior makes me mad :(
Browse files Browse the repository at this point in the history
  • Loading branch information
halturin committed May 11, 2021
1 parent d85ff42 commit 92cfd8f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ func TakeTimer() *time.Timer {
}

func ReleaseTimer(t *time.Timer) {
if !t.Stop() {
<-t.C
}
t.Stop()
timers.Put(t)
}

Expand Down

0 comments on commit 92cfd8f

Please sign in to comment.