diff options
| author | 2011-06-18 17:37:49 -0400 | |
|---|---|---|
| committer | 2011-06-18 17:40:39 -0400 | |
| commit | f235772cf1781ac9e9b50e1c4c91d59666063436 (patch) | |
| tree | 71619e4d2fb39dfd8557273823a941386f662ee4 /src/threadengines/threadengine_win32.cpp | |
| parent | Fix extras compilation under Windows (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/threadengine_win32.cpp')
| -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"); |
