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 21, 2015
1 parent 4dee090 commit 7f3bb79
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 7f3bb79

Please sign in to comment.