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:
parent
989e7a9c48
commit
d9214030e0
1 changed files with 3 additions and 0 deletions
|
@ -171,6 +171,9 @@ func (s *server) handleRelayInvMsg(peers *list.List, iv *btcwire.InvVect) {
|
||||||
// which are not already known to have it.
|
// which are not already known to have it.
|
||||||
for e := peers.Front(); e != nil; e = e.Next() {
|
for e := peers.Front(); e != nil; e = e.Next() {
|
||||||
p := e.Value.(*peer)
|
p := e.Value.(*peer)
|
||||||
|
if p.conn == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// Queue the inventory to be relayed with the next batch. It
|
// Queue the inventory to be relayed with the next batch. It
|
||||||
// will be ignored if the peer is already known to have the
|
// will be ignored if the peer is already known to have the
|
||||||
|
|
Loading…
Reference in a new issue