diff --git a/fundingmanager.go b/fundingmanager.go index 52135c4a..aec8567a 100644 --- a/fundingmanager.go +++ b/fundingmanager.go @@ -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 diff --git a/rpcserver.go b/rpcserver.go index 923cfb6b..62f3a414 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -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 {