diff options
author | Mattes D <github@xoft.cz> | 2015-01-15 21:11:36 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-01-22 20:12:58 +0100 |
commit | 60807adfb577552bc462660920f42fac0c3c60f3 (patch) | |
tree | 144f1853d397ade5d524edf235bfa81c02f3189b /src/OSSupport/Network.cpp | |
parent | cNetwork: Added an OnError callback for listening servers. (diff) | |
download | cuberite-60807adfb577552bc462660920f42fac0c3c60f3.tar cuberite-60807adfb577552bc462660920f42fac0c3c60f3.tar.gz cuberite-60807adfb577552bc462660920f42fac0c3c60f3.tar.bz2 cuberite-60807adfb577552bc462660920f42fac0c3c60f3.tar.lz cuberite-60807adfb577552bc462660920f42fac0c3c60f3.tar.xz cuberite-60807adfb577552bc462660920f42fac0c3c60f3.tar.zst cuberite-60807adfb577552bc462660920f42fac0c3c60f3.zip |
Diffstat (limited to 'src/OSSupport/Network.cpp')
-rw-r--r-- | src/OSSupport/Network.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/OSSupport/Network.cpp b/src/OSSupport/Network.cpp index 4dc8d1df1..c26a8e17d 100644 --- a/src/OSSupport/Network.cpp +++ b/src/OSSupport/Network.cpp @@ -1076,7 +1076,13 @@ cNetworkSingleton::cNetworkSingleton(void) #ifdef _WIN32 WSADATA wsaData; memset(&wsaData, 0, sizeof(wsaData)); - WSAStartup (MAKEWORD(2, 2), &wsaData); + int res = WSAStartup (MAKEWORD(2, 2), &wsaData); + if (res != 0) + { + int err = WSAGetLastError(); + LOGWARNING("WSAStartup failed: %d, WSAGLE = %d (%s)", res, err, evutil_socket_error_to_string(err)); + exit(1); + } #endif // _WIN32 // Initialize LibEvent logging: |