peer: stop a channel's goroutines within wipeChannel

This commit is contained in:
Olaoluwa Osuntokun committed 2017-05-14 19:21:23 -07:00
1 parent 9c685433f3
commit 7df1d75267
1 file changed
+2
+2
View File
@@ -1094,6 +1094,8 @@ func waitForChanToClose(bestHeight uint32, notifier chainntnfs.ChainNotifier,
// wipeChannel removes the passed channel from all indexes associated with the
// peer, and deletes the channel from the database.
func wipeChannel(p *peer, channel *lnwallet.LightningChannel) error {
channel.Stop()
chanID := lnwire.NewChanIDFromOutPoint(channel.ChannelPoint())
p.activeChanMtx.Lock()