X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fnet.cpp;h=838425109508f90153c397761552413cd1354bce;hb=3703150d56ff6ee557ab330e55637c9c23835902;hp=5b3faea79ddc146abc4ccefdeb1dca1753c6ee28;hpb=a93ab877877925c60b2dbf56bdde8aa46b6b7391;p=novacoin.git diff --git a/src/net.cpp b/src/net.cpp index 5b3faea..8384251 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "headers.h" #include "irc.h" @@ -12,6 +12,8 @@ #ifdef WIN32 #include +#else +#include #endif #ifdef USE_UPNP @@ -912,7 +914,7 @@ void ThreadSocketHandler2(void* parg) if (nSelect == SOCKET_ERROR) { int nErr = WSAGetLastError(); - if (hSocketMax > -1) + if (hSocketMax != INVALID_SOCKET) { printf("socket select error %d\n", nErr); for (unsigned int i = 0; i <= hSocketMax; i++) @@ -1703,7 +1705,7 @@ void ThreadMessageHandler2(void* parg) vnThreadsRunning[2]--; Sleep(100); if (fRequestShutdown) - Shutdown(NULL); + StartShutdown(); vnThreadsRunning[2]++; if (fShutdown) return;