summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp5
-rw-r--r--src/socketengine_iocp.cpp2
2 files changed, 2 insertions, 5 deletions
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)