Don't propagate inv messages to connecting peers.

Only queue messages for peers that have finished connecting to prevent
filling goroutines and causing deadlocks.
This commit is contained in:
Owain G. Ainsworth 2013-09-17 23:39:49 +01:00
parent 989e7a9c48
commit d9214030e0

View file

@ -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