summaryrefslogtreecommitdiff
path: root/src/threadengines
diff options
context:
space:
mode:
authorDaniel De Graaf <danieldg@inspircd.org>2011-06-18 17:37:49 -0400
committerDaniel De Graaf <danieldg@inspircd.org>2011-06-18 17:40:39 -0400
commitf235772cf1781ac9e9b50e1c4c91d59666063436 (patch)
tree71619e4d2fb39dfd8557273823a941386f662ee4 /src/threadengines
parent699a8b2fc82949bfd5a39acc5b00670a5c350b4d (diff)
Fix WSAEWOULDBLOCK error on Windows
Making a connection and then immediately accepting it is not synchronous on Windows; force the accept to block and wait for the connection we just made.
Diffstat (limited to 'src/threadengines')
-rw-r--r--src/threadengines/threadengine_win32.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/threadengines/threadengine_win32.cpp b/src/threadengines/threadengine_win32.cpp
index 5cf20f862..674d0fab1 100644
--- a/src/threadengines/threadengine_win32.cpp
+++ b/src/threadengines/threadengine_win32.cpp
@@ -89,6 +89,7 @@ SocketThread::SocketThread()
socklen_t sz = sizeof(addr);
getsockname(listenFD, reinterpret_cast<struct sockaddr*>(&addr), &sz);
connect(connFD, reinterpret_cast<struct sockaddr*>(&addr), sz);
+ ServerInstance->SE->Blocking(listenFD);
int nfd = accept(listenFD, reinterpret_cast<struct sockaddr*>(&addr), &sz);
if (nfd < 0)
throw CoreException("Could not create ITC pipe");