From 70e79525c97c33a5fca8674d47d86cc2b7ae197a Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Fri, 13 Nov 2009 01:23:08 +0000 Subject: monitor ThreadSocketHandler and terminate and restart if hung, convert _beginthread to CreateThread wrapper, disconnect inactive connections, ping, break up long messages to speed up initial download, better priorities for initiating connections, track how many nodes have requested our blocks and transactions, status #/offline and warning message on unsent blocks, minimize on close as separate option -- linux-test5 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@38 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- irc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'irc.cpp') diff --git a/irc.cpp b/irc.cpp index 3b232caea..8432c6d14 100644 --- a/irc.cpp +++ b/irc.cpp @@ -54,7 +54,7 @@ static bool Send(SOCKET hSocket, const char* pszSend) const char* pszEnd = psz + strlen(psz); while (psz < pszEnd) { - int ret = send(hSocket, psz, pszEnd - psz, 0); + int ret = send(hSocket, psz, pszEnd - psz, MSG_NOSIGNAL); if (ret < 0) return false; psz += ret; @@ -156,7 +156,7 @@ bool Wait(int nSeconds) void ThreadIRCSeed(void* parg) { - SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL); + SetThreadPriority(THREAD_PRIORITY_NORMAL); int nErrorWait = 10; int nRetryWait = 10; @@ -256,6 +256,7 @@ void ThreadIRCSeed(void* parg) CAddress addr; if (DecodeAddress(pszName, addr)) { + addr.nTime = GetAdjustedTime() - 51 * 60; CAddrDB addrdb; if (AddAddress(addrdb, addr)) printf("IRC got new address\n"); -- cgit v1.2.3