aboutsummaryrefslogtreecommitdiff
path: root/net.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-12-13 00:13:16 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-12-13 00:13:16 +0000
commit25b12b8839be4fc5a051656aad82870c083cce4d (patch)
treea1a40f23d06f9150c96db876f0e43879037841ae /net.cpp
parent433fb54b25397d2df117e81345507c08832dfb06 (diff)
downloadbitcoin-25b12b8839be4fc5a051656aad82870c083cce4d.tar.xz
misc exit code, updated setup.nsi
Diffstat (limited to 'net.cpp')
-rw-r--r--net.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/net.cpp b/net.cpp
index 436a5abf7b..941e7c4dc9 100644
--- a/net.cpp
+++ b/net.cpp
@@ -929,7 +929,7 @@ void ThreadOpenConnections2(void* parg)
// Only try the old stuff if we don't have enough connections
if (vNodes.size() >= 2 && nSinceLastSeen > 7 * 24 * 60 * 60)
continue;
- if (vNodes.size() >= 4 && nSinceLastSeen > 24 * 60 * 60)
+ if (vNodes.size() >= 5 && nSinceLastSeen > 24 * 60 * 60)
continue;
// If multiple addresses are ready, prioritize by time since
@@ -1256,11 +1256,14 @@ void StartNode(void* parg)
//
// Thread monitoring
+ // Not really needed anymore, the cause of the hanging was fixed
//
loop
{
- Sleep(15000);
- if (GetTime() - nThreadSocketHandlerHeartbeat > 4 * 60)
+ Sleep(1000);
+ if (fShutdown)
+ return;
+ if (GetTime() - nThreadSocketHandlerHeartbeat > 15 * 60)
{
// First see if closing sockets will free it
printf("*** ThreadSocketHandler is stopped ***\n");
@@ -1280,6 +1283,8 @@ void StartNode(void* parg)
}
}
Sleep(10000);
+ if (fShutdown)
+ return;
if (GetTime() - nThreadSocketHandlerHeartbeat < 60)
continue;