diff --git a/chainntnfs/btcdnotify/btcd.go b/chainntnfs/btcdnotify/btcd.go index 8b229e5b..0bfb2fc0 100644 --- a/chainntnfs/btcdnotify/btcd.go +++ b/chainntnfs/btcdnotify/btcd.go @@ -476,7 +476,10 @@ func (b *BtcdNotifier) notifyBlockEpochs(newHeight int32, newSha *chainhash.Hash } for _, epochChan := range b.blockEpochClients { + b.wg.Add(1) go func(ntfnChan chan *chainntnfs.BlockEpoch) { + defer b.wg.Done() + select { case ntfnChan <- epoch: case <-b.quit: