diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 47a4157d7..e8710631c 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -126,6 +126,9 @@ static Program *mainProgram = NULL; static FileCRCPreCacheThread *preCacheThread = NULL; #ifdef WIN32 static string runtimeErrorMsg = ""; +// keeps in scope for duration of the application +auto_ptr winSockManager(new SocketManager()); + #endif #ifdef HAVE_GOOGLE_BREAKPAD @@ -4246,9 +4249,9 @@ int glestMain(int argc, char** argv) { -#ifdef WIN32 - SocketManager winSockManager; -#endif +//#ifdef WIN32 + //SocketManager winSockManager; +//#endif bool haveSpecialOutputCommandLineOption = false; diff --git a/source/shared_lib/include/platform/posix/socket.h b/source/shared_lib/include/platform/posix/socket.h index 637685774..e75f2bb11 100644 --- a/source/shared_lib/include/platform/posix/socket.h +++ b/source/shared_lib/include/platform/posix/socket.h @@ -129,9 +129,9 @@ public: class Socket { protected: -#ifdef WIN32 - static SocketManager wsaManager; -#endif +//#ifdef WIN32 + //static SocketManager wsaManager; +//#endif PLATFORM_SOCKET sock; time_t lastDebugEvent; static int broadcast_portno; diff --git a/source/shared_lib/sources/platform/posix/socket.cpp b/source/shared_lib/sources/platform/posix/socket.cpp index d82aad968..bc6dda040 100644 --- a/source/shared_lib/sources/platform/posix/socket.cpp +++ b/source/shared_lib/sources/platform/posix/socket.cpp @@ -228,7 +228,7 @@ Mutex UPNP_Tools::mutexUPNP; } // keeps in scope for duration of the application - SocketManager Socket::wsaManager; + //SocketManager Socket::wsaManager; SocketManager::SocketManager() { WSADATA wsaData;