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)
|
||||
return
|
||||
}
|
||||
defer channel.Stop()
|
||||
|
||||
// Next, we'll send over the funding locked message which marks that we
|
||||
// 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 {
|
||||
return err
|
||||
}
|
||||
defer channel.Stop()
|
||||
|
||||
_, bestHeight, err := r.server.cc.chainIO.GetBestBlock()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user