mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-03 02:02:17 +02:00
multi: ensure that BlockEpoch clients are cancelled
This commit fixes a prior goroutine leak that could result in a node having thousands of goroutines, particularly due to many concurrent channel fundings. We now ensure that for each BlockEpoch client created, we ensure that the client is cancelled once the creating grouting exits.
This commit is contained in:
@@ -321,6 +321,7 @@ func (u *utxoNursery) incubator(newBlockChan *chainntnfs.BlockEpochEvent,
|
||||
startingHeight uint32) {
|
||||
|
||||
defer u.wg.Done()
|
||||
defer newBlockChan.Cancel()
|
||||
|
||||
currentHeight := startingHeight
|
||||
out:
|
||||
|
Reference in New Issue
Block a user