diff options
author | Daniel De Graaf <danieldg@inspircd.org> | 2011-06-18 17:37:49 -0400 |
---|---|---|
committer | Daniel De Graaf <danieldg@inspircd.org> | 2011-06-18 17:40:39 -0400 |
commit | f235772cf1781ac9e9b50e1c4c91d59666063436 (patch) | |
tree | 71619e4d2fb39dfd8557273823a941386f662ee4 | |
parent | 699a8b2fc82949bfd5a39acc5b00670a5c350b4d (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.
-rw-r--r-- | src/threadengines/threadengine_win32.cpp | 1 |
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"); |