mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
multi: ensure all lnwallet.LightningChannel's are stopped
This commit ensures that we always clean up the resources that are created when a new instance of a lnwallet.LightningChannel is instantiated. The is necessary due to the sigPool that’s now present as an internal goroutine.
This commit is contained in:
parent
f963859524
commit
5425eff09c
@ -1090,6 +1090,7 @@ func (f *fundingManager) waitForFundingConfirmation(completeChan *channeldb.Open
|
|||||||
fndgLog.Errorf("error creating new lightning channel: %v", err)
|
fndgLog.Errorf("error creating new lightning channel: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
defer channel.Stop()
|
||||||
|
|
||||||
// Next, we'll send over the funding locked message which marks that we
|
// Next, we'll send over the funding locked message which marks that we
|
||||||
// consider the channel open by presenting the remote party with our
|
// consider the channel open by presenting the remote party with our
|
||||||
|
@ -563,6 +563,7 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer channel.Stop()
|
||||||
|
|
||||||
_, bestHeight, err := r.server.cc.chainIO.GetBestBlock()
|
_, bestHeight, err := r.server.cc.chainIO.GetBestBlock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user