Skip to content

Commit

Permalink
peer: remove getaddr msg from stall detection.
Browse files Browse the repository at this point in the history
The getaddr msg is usually replied to with an addr msg, but if
the other peer does not have any addresses to share it will not
reply at all (instead of replying with an addr msg with 0 addresses).
Therefore, the getaddr msg is not guaranteed a reply, so this commit
removes it from stall detection to avoid incorrectly kicking
such peers.
  • Loading branch information
Dirbaio committed Dec 27, 2015
1 parent 87182a2 commit 89af747
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions peer/peer.go
Expand Up @@ -1265,10 +1265,6 @@ func (p *Peer) maybeAddDeadline(pendingResponses map[string]time.Time, msgCmd st
// Expects a verack message.
pendingResponses[wire.CmdVerAck] = deadline

case wire.CmdGetAddr:
// Expects an addr message.
pendingResponses[wire.CmdAddr] = deadline

case wire.CmdMemPool:
// Expects an inv message.
pendingResponses[wire.CmdInv] = deadline
Expand Down

0 comments on commit 89af747

Please sign in to comment.