aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 2c6efff63c..c0693306af 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -827,8 +827,9 @@ void ThreadSocketHandler2(void* parg)
if (hSocket == INVALID_SOCKET)
{
- if (WSAGetLastError() != WSAEWOULDBLOCK)
- printf("socket error accept failed: %d\n", WSAGetLastError());
+ int nErr = WSAGetLastError();
+ if (nErr != WSAEWOULDBLOCK)
+ printf("socket error accept failed: %d\n", nErr);
}
else if (nInbound >= GetArg("-maxconnections", 125) - MAX_OUTBOUND_CONNECTIONS)
{