revert back curRate != 0

This commit is contained in:
Anton Kaliaev 2018-02-09 13:02:44 +04:00
parent c8990d06d9
commit 0c1b91b762
No known key found for this signature in database
GPG Key ID: 7B6881D965918214
1 changed files with 2 additions and 2 deletions

View File

@ -126,8 +126,8 @@ func (pool *BlockPool) removeTimedoutPeers() {
for _, peer := range pool.peers {
if !peer.didTimeout && peer.numPending > 0 {
curRate := peer.recvMonitor.Status().CurRate
// XXX remove curRate != 0
if curRate < minRecvRate {
// curRate can be 0 on start
if curRate != 0 && curRate < minRecvRate {
pool.sendTimeout(peer.id)
pool.Logger.Error("SendTimeout", "peer", peer.id,
"reason", "peer is not sending us data fast enough",