X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Firc.cpp;h=57e7d88f50e821e6ee7b426bf42b0d6b0bd049d5;hp=b3201b12656b1cae97bbb70086e819bebd246659;hb=cd7e570c1f74a1f1ab1590ecbb09bd3bfcb363ea;hpb=47bb141bf2d589db630ac1a917189b05b75b80d0 diff --git a/src/irc.cpp b/src/irc.cpp index b3201b1..57e7d88 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -248,8 +248,7 @@ void ThreadIRCSeed2(void* parg) if (!RecvUntil(hSocket, "Found your hostname", "using your IP address instead", "Couldn't look up your hostname", "ignoring hostname")) { - closesocket(hSocket); - hSocket = INVALID_SOCKET; + CloseSocket(hSocket); nErrorWait = nErrorWait * 11 / 10; if (Wait(nErrorWait += 60)) continue; @@ -273,8 +272,7 @@ void ThreadIRCSeed2(void* parg) int nRet = RecvUntil(hSocket, " 004 ", " 433 "); if (nRet != 1) { - closesocket(hSocket); - hSocket = INVALID_SOCKET; + CloseSocket(hSocket); if (nRet == 2) { printf("IRC name already in use\n"); @@ -365,8 +363,7 @@ void ThreadIRCSeed2(void* parg) } } } - closesocket(hSocket); - hSocket = INVALID_SOCKET; + CloseSocket(hSocket); if (GetTime() - nStart > 20 * 60) {