From 39ebb06a6ab604d8aa491e8dd218d383cd4968d6 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 23 Aug 2007 20:05:05 +0000 Subject: Move WSACleanup() into IOCPEngine destructor, eliminating an "#ifdef WIN32" from inspircd.cpp git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7807 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 5 ----- src/socketengine_iocp.cpp | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 4c19878d7..f4a9b7e32 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -122,11 +122,6 @@ void InspIRCd::Cleanup() /* Cleanup Server Names */ for(servernamelist::iterator itr = servernames.begin(); itr != servernames.end(); ++itr) delete (*itr); - -#ifdef WINDOWS - /* WSACleanup */ - WSACleanup(); -#endif } void InspIRCd::Restart(const std::string &reason) diff --git a/src/socketengine_iocp.cpp b/src/socketengine_iocp.cpp index 4eb9f83cd..eb881f280 100644 --- a/src/socketengine_iocp.cpp +++ b/src/socketengine_iocp.cpp @@ -37,7 +37,9 @@ IOCPEngine::IOCPEngine(InspIRCd * Instance) : SocketEngine(Instance) IOCPEngine::~IOCPEngine() { + /* Clean up winsock and close completion port */ CloseHandle(m_completionPort); + WSACleanup(); } bool IOCPEngine::AddFd(EventHandler* eh) -- cgit v1.2.3