Skip to content

Commit 93ff1b9

Browse files
committed
net: correctly initialize nMinPingUsecTime
`nMinPingUsecTime` was left uninitialized in CNode. The correct initialization for a minimum-until-now is int64_t's max value, so initialize it to that. Thanks @MarcoFalke for noticing.
1 parent bbc2b39 commit 93ff1b9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/net.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,6 +2261,7 @@ CNode::CNode(SOCKET hSocketIn, const CAddress& addrIn, const std::string& addrNa
22612261
nPingUsecStart = 0;
22622262
nPingUsecTime = 0;
22632263
fPingQueued = false;
2264+
nMinPingUsecTime = std::numeric_limits<int64_t>::max();
22642265

22652266
{
22662267
LOCK(cs_nLastNodeId);

0 commit comments

Comments
 (0)