aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-02-07 15:23:17 -0500
committerMatt Corallo <git@bluematt.me>2017-02-07 17:44:46 -0500
commit2cbd1196b7a07b08cfd91417f2e8ddd09d9f2082 (patch)
tree9498b7cb6c5713d3cbe88a94a7c131af0072dab8
parentb709fe7ffc44ae14bbd2403cdfbfa4fcf94cef6b (diff)
Disconnect peers which we do not receive VERACKs from within 60 sec
-rw-r--r--src/net.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 4d0d781d6d..3394f8a08e 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1323,6 +1323,11 @@ void CConnman::ThreadSocketHandler()
LogPrintf("ping timeout: %fs\n", 0.000001 * (GetTimeMicros() - pnode->nPingUsecStart));
pnode->fDisconnect = true;
}
+ else if (!pnode->fSuccessfullyConnected)
+ {
+ LogPrintf("version handshake timeout from %d\n", pnode->id);
+ pnode->fDisconnect = true;
+ }
}
}
{