summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-23 20:05:05 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-23 20:05:05 +0000
commit39ebb06a6ab604d8aa491e8dd218d383cd4968d6 (patch)
tree16a741e4b6eb3a2bc13b4597640ce41d97f11fba /src
parent443b0f9645d861ca47a6f041a46703e27da7c0c8 (diff)
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
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)