diff --git a/htlcswitch/link.go b/htlcswitch/link.go index 48c60bbfb..067f32924 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -369,14 +369,17 @@ out: case <-l.channel.UnilateralCloseSignal: log.Warnf("Remote peer has closed ChannelPoint(%v) on-chain", l.channel.ChannelPoint()) - if err := l.cfg.Peer.WipeChannel(l.channel); err != nil { - log.Errorf("unable to wipe channel %v", err) - } - // TODO(roasbeef): need to send HTLC outputs to nursery + go func() { + if err := l.cfg.Peer.WipeChannel(l.channel); err != nil { + log.Errorf("unable to wipe channel %v", err) + } + + // TODO(roasbeef): need to send HTLC outputs to nursery + // TODO(roasbeef): or let the arb sweep? + l.cfg.SettledContracts <- l.channel.ChannelPoint() + }() - // TODO(roasbeef): or let the arb sweep? - l.cfg.SettledContracts <- l.channel.ChannelPoint() break out // A local sub-system has initiated a force close of the active diff --git a/htlcswitch/switch.go b/htlcswitch/switch.go index 683e8e8eb..0e1ae2b49 100644 --- a/htlcswitch/switch.go +++ b/htlcswitch/switch.go @@ -968,7 +968,7 @@ func (s *Switch) removeLink(chanID lnwire.ChannelID) error { peerPub := link.Peer().PubKey() delete(s.interfaceIndex, peerPub) - go link.Stop() + link.Stop() return nil }