diff --git a/peer.go b/peer.go index 600fbce1..f323ce96 100644 --- a/peer.go +++ b/peer.go @@ -537,6 +537,7 @@ func (c *chanMsgStream) msgConsumer() { // slice's reference down one in order to remove the message // from the queue. msg := c.msgs[0] + c.msgs[0] = nil // Set to nil to prevent GC leak. c.msgs = c.msgs[1:] // We'll send a message to the funding manager and wait iff an @@ -859,6 +860,9 @@ func (p *peer) queueHandler() { // If there weren't any messages to send, or the writehandler // is still blocked, then we'll accept a new message into the // queue from outside sub-systems. + // + // TODO(roasbeef): need send clause here as well to account for + // writeHandler blocking? select { case <-p.quit: return