summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/Network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cppe/src/IceE/Network.cpp')
-rw-r--r--cppe/src/IceE/Network.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/cppe/src/IceE/Network.cpp b/cppe/src/IceE/Network.cpp
index b7448fa4843..30e38f80adf 100644
--- a/cppe/src/IceE/Network.cpp
+++ b/cppe/src/IceE/Network.cpp
@@ -510,6 +510,23 @@ repeatConnect:
throw ex;
}
+#ifdef ICEE_USE_SOCKET_TIMEOUT
+ //
+ // This is necessary to be able to set the socket in blocking mode.
+ //
+ if(WSAEventSelect(fd, event, 0) == SOCKET_ERROR)
+ {
+ int error = WSAGetLastError();
+
+ WSACloseEvent(event);
+ closeSocketNoThrow(fd);
+
+ SocketException ex(__FILE__, __LINE__);
+ ex.error = error;
+ throw ex;
+ }
+#endif
+
//
// Now we close the event, because we're finished and
// this code be repeated.