diff options
author | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2009-12-13 00:13:16 +0000 |
---|---|---|
committer | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2009-12-13 00:13:16 +0000 |
commit | e39bc50eb4dd4f0a34ee4c264af83043f13543dd (patch) | |
tree | a1a40f23d06f9150c96db876f0e43879037841ae /net.cpp | |
parent | 651d33556982d038d39f04373b9f63913bf03187 (diff) |
misc exit code, updated setup.nsi
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@46 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'net.cpp')
-rw-r--r-- | net.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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;
|