chainntnfs: ensure ntfn cancellation loop will exit

This commit fixes a slight bug introduced. We now ensure that the
cancel loop always exists if the ChainNotifier has been signaled for a
quit.
This commit is contained in:
Olaoluwa Osuntokun committed 2017-08-01 17:14:11 -07:00
1 parent b6057abe93
commit 399d9c974f
2 files changed
+4

No files matched your search

+2
View File
@@ -692,6 +692,7 @@ func (b *BtcdNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint,
return
}
case <-b.quit:
return
}
}
case <-b.quit:
@@ -788,6 +789,7 @@ func (b *BtcdNotifier) RegisterBlockEpochNtfn() (*chainntnfs.BlockEpochEvent, er
return
}
case <-b.quit:
return
}
}
case <-b.quit: