From d9214030e0dc0409045586d276512fa244170dcd Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Tue, 17 Sep 2013 23:39:49 +0100 Subject: [PATCH] Don't propagate inv messages to connecting peers. Only queue messages for peers that have finished connecting to prevent filling goroutines and causing deadlocks. --- server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.go b/server.go index 743c8a61..95bfab2e 100644 --- a/server.go +++ b/server.go @@ -171,6 +171,9 @@ func (s *server) handleRelayInvMsg(peers *list.List, iv *btcwire.InvVect) { // which are not already known to have it. for e := peers.Front(); e != nil; e = e.Next() { p := e.Value.(*peer) + if p.conn == nil { + continue + } // Queue the inventory to be relayed with the next batch. It // will be ignored if the peer is already known to have the