aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-02-14 14:34:20 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-02-14 14:35:15 +0100
commitb08656e343141a7262975e245f7c4cd70829a678 (patch)
tree1036c3a9956b65eb7ff9176f6f25bb0da835e8d0 /src/net.cpp
parentedc9e63c57992a839614dd2f9a54f77fdbffb6ab (diff)
parent66f861ade9db108f979a9bdf8d90e8fca028e2a3 (diff)
Merge #9715: Disconnect peers which we do not receive VERACKs from within 60 sec
66f861a Add a test for P2P inactivity timeouts (Matt Corallo) b436f92 qa: Expose on-connection to mininode listeners (Matt Corallo) 8aaba7a qa: mininode learns when a socket connects, not its first action (Matt Corallo) 2cbd119 Disconnect peers which we do not receive VERACKs from within 60 sec (Matt Corallo)
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 505eb971c0..de5fc29693 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1388,6 +1388,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;
+ }
}
}
{