stop the timer when the session's run loop returns

This commit is contained in:
Marten Seemann
2020-05-02 07:53:47 +07:00
parent 6d66eac1b9
commit 1db3f06e87
3 changed files with 13 additions and 0 deletions

View File

@@ -46,3 +46,8 @@ func (t *Timer) Reset(deadline time.Time) {
func (t *Timer) SetRead() {
t.read = true
}
// Stop stops the timer
func (t *Timer) Stop() {
t.t.Stop()
}