diff --git a/fundingmanager.go b/fundingmanager.go index 821d210ed..d3a540f7e 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 4d016cc0e..8ccd9aca1 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: