diff --git a/fundingmanager.go b/fundingmanager.go index 821d210e..d3a540f7 100644 --- a/fundingmanager.go +++ b/fundingmanager.go @@ -1210,6 +1210,8 @@ func (f *fundingManager) waitForFundingWithTimeout(completeChan *channeldb.OpenC return } + defer epochClient.Cancel() + waitingDoneChan := make(chan struct{}) cancelChan := make(chan struct{}) diff --git a/utxonursery.go b/utxonursery.go index 4d016cc0..8ccd9aca 100644 --- a/utxonursery.go +++ b/utxonursery.go @@ -321,6 +321,7 @@ func (u *utxoNursery) incubator(newBlockChan *chainntnfs.BlockEpochEvent, startingHeight uint32) { defer u.wg.Done() + defer newBlockChan.Cancel() currentHeight := startingHeight out: