diff options
author | Zain Iqbal Allarakhia <zain@za1.co> | 2018-11-15 15:30:26 -0800 |
---|---|---|
committer | Zain Iqbal Allarakhia <zain.allarakhia@gmail.com> | 2018-11-28 16:41:15 -0800 |
commit | 8042bbfbf001d60feead6f04c99e0fca93dbba3c (patch) | |
tree | 7d5b5881488e4218b200746f6a8dee58422aad71 /src/net.cpp | |
parent | 384967f311b4c6b1d6c797f7821d25feb26bafbf (diff) |
p2p: allow p2ptimeout to be configurable, speed up slow test
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index 65a308780a..1787e1eb2c 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1232,11 +1232,11 @@ void CConnman::NotifyNumConnectionsChanged() void CConnman::InactivityCheck(CNode *pnode) { int64_t nTime = GetSystemTimeInSeconds(); - if (nTime - pnode->nTimeConnected > 60) + if (nTime - pnode->nTimeConnected > m_peer_connect_timeout) { if (pnode->nLastRecv == 0 || pnode->nLastSend == 0) { - LogPrint(BCLog::NET, "socket no message in first 60 seconds, %d %d from %d\n", pnode->nLastRecv != 0, pnode->nLastSend != 0, pnode->GetId()); + LogPrint(BCLog::NET, "socket no message in first %i seconds, %d %d from %d\n", m_peer_connect_timeout, pnode->nLastRecv != 0, pnode->nLastSend != 0, pnode->GetId()); pnode->fDisconnect = true; } else if (nTime - pnode->nLastSend > TIMEOUT_INTERVAL) |