diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2013-04-08 08:21:06 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2013-04-08 08:21:06 -0700 |
commit | b7b774d82f536f5e080c07847e638d5c801f74af (patch) | |
tree | 29588aea59897c9076fe0cad0539cb99e66ca639 /src/net.cpp | |
parent | 1829134afec6058d2d7d713b5b280a2d4605bb2e (diff) | |
parent | cedaa714462871213472019545b8e862dacdac91 (diff) |
Merge pull request #2419 from sipa/noreltime
Drop release times for CNode
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/net.cpp b/src/net.cpp index 0defa96e40..910baf6b56 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -449,7 +449,7 @@ CNode* FindNode(const CService& addr) return NULL; } -CNode* ConnectNode(CAddress addrConnect, const char *pszDest, int64 nTimeout) +CNode* ConnectNode(CAddress addrConnect, const char *pszDest) { if (pszDest == NULL) { if (IsLocal(addrConnect)) @@ -459,10 +459,7 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest, int64 nTimeout) CNode* pnode = FindNode((CService)addrConnect); if (pnode) { - if (nTimeout != 0) - pnode->AddRef(nTimeout); - else - pnode->AddRef(); + pnode->AddRef(); return pnode; } } @@ -494,10 +491,7 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest, int64 nTimeout) // Add node CNode* pnode = new CNode(hSocket, addrConnect, pszDest ? pszDest : "", false); - if (nTimeout != 0) - pnode->AddRef(nTimeout); - else - pnode->AddRef(); + pnode->AddRef(); { LOCK(cs_vNodes); @@ -611,7 +605,6 @@ void CNode::copyStats(CNodeStats &stats) X(nVersion); X(strSubVer); X(fInbound); - X(nReleaseTime); X(nStartingHeight); X(nMisbehavior); } @@ -769,7 +762,6 @@ void ThreadSocketHandler() pnode->Cleanup(); // hold in disconnected pool until all refs are released - pnode->nReleaseTime = max(pnode->nReleaseTime, GetTime() + 15 * 60); if (pnode->fNetworkNode || pnode->fInbound) pnode->Release(); vNodesDisconnected.push_back(pnode); |