X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fnet.cpp;h=ab079cfcff177c87c1d8ed1084c24b252bac826b;hp=698c4d49fed3c0d1f71bbc345c1950fc9ce47a90;hb=428f94b5411bf51b6e77d611daa709dfbb063966;hpb=4311474989d7a780084ecc9640ef23f1a8876a26 diff --git a/src/net.cpp b/src/net.cpp index 698c4d4..ab079cf 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1808,6 +1808,7 @@ bool BindListenPort(const CService &addrBind, string& strError) else strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %d, %s)"), addrBind.ToString().c_str(), nErr, strerror(nErr)); printf("%s\n", strError.c_str()); + closesocket(hListenSocket); return false; } printf("Bound to %s\n", addrBind.ToString().c_str()); @@ -1817,6 +1818,7 @@ bool BindListenPort(const CService &addrBind, string& strError) { strError = strprintf("Error: Listening for incoming connections failed (listen returned error %d)", WSAGetLastError()); printf("%s\n", strError.c_str()); + closesocket(hListenSocket); return false; }