1
0
Fork 0

Merge v1.2.1-master

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge 2017-04-11 17:10:46 +02:00
parent a590155b0b
commit aeb17182b4
No known key found for this signature in database
GPG key ID: D808B4C167352E59
396 changed files with 27271 additions and 9969 deletions

View file

@ -13,7 +13,7 @@ import (
type Ticker struct {
C <-chan time.Time
c chan time.Time
b BackOff
b BackOffContext
stop chan struct{}
stopOnce sync.Once
}
@ -26,7 +26,7 @@ func NewTicker(b BackOff) *Ticker {
t := &Ticker{
C: c,
c: c,
b: b,
b: ensureContext(b),
stop: make(chan struct{}),
}
go t.run()
@ -58,6 +58,8 @@ func (t *Ticker) run() {
case <-t.stop:
t.c = nil // Prevent future ticks from being sent to the channel.
return
case <-t.b.Context().Done():
return
}
}
}