diff --git a/common/repeat_timer.go b/common/repeat_timer.go index 96348bd1..2e6cb81c 100644 --- a/common/repeat_timer.go +++ b/common/repeat_timer.go @@ -36,8 +36,7 @@ func (t *defaultTicker) Chan() <-chan time.Time { // Implements Ticker func (t *defaultTicker) Stop() { - tt := time.Ticker(*t) - tt.Stop() + ((*time.Ticker)(t)).Stop() } //---------------------------------------- diff --git a/common/repeat_timer_test.go b/common/repeat_timer_test.go index 269316bd..da168707 100644 --- a/common/repeat_timer_test.go +++ b/common/repeat_timer_test.go @@ -31,7 +31,7 @@ func TestRepeat(t *testing.T) { for i := 0; i < cnt; i++ { timeout := time.After(time.Second * 2) select { - case _ = <-rt.Chan(): + case <-rt.Chan(): case <-timeout: t.Fatal("expected RepeatTimer to fire") }