Skip to content

Commit

Permalink
defer tock.Stop()
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed May 20, 2015
1 parent f52edd1 commit f9f85ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions exchange/bitswap/wantmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ func (pm *WantManager) Disconnected(p peer.ID) {
// TODO: use goprocess here once i trust it
func (pm *WantManager) Run() {
tock := time.NewTicker(rebroadcastDelay.Get())
defer tock.Stop()
for {
select {
case entries := <-pm.incoming:
Expand Down

0 comments on commit f9f85ff

Please sign in to comment.