Browse Source

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.
0.13
Wladimir J. van der Laan 9 years ago
parent
commit
93ff1b9041
  1. 1
      src/net.cpp

1
src/net.cpp

@ -2261,6 +2261,7 @@ CNode::CNode(SOCKET hSocketIn, const CAddress& addrIn, const std::string& addrNa
nPingUsecStart = 0; nPingUsecStart = 0;
nPingUsecTime = 0; nPingUsecTime = 0;
fPingQueued = false; fPingQueued = false;
nMinPingUsecTime = std::numeric_limits<int64_t>::max();
{ {
LOCK(cs_nLastNodeId); LOCK(cs_nLastNodeId);

Loading…
Cancel
Save