From 9eb61d66cc7fa5edd866d19ebb908eebc403f259 Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 16 Feb 2010 14:13:22 +0000 Subject: Close and delete server sockets when they are in DYING state, should avoid 100% CPU in other socketengines git-svn-id: http://svn.inspircd.org/repository/branches/1_2_stable@12473 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspsocket.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/inspsocket.cpp') diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 7718fe70a..3635b9b84 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -291,8 +291,9 @@ void BufferedSocket::Close() } } ServerInstance->SE->Shutdown(this, 2); - if (ServerInstance->SE->Close(this) != -1) - this->OnClose(); + ServerInstance->SE->DelFd(this, false); + ServerInstance->SE->Close(this); + this->OnClose(); if (ServerInstance->SocketCull.find(this) == ServerInstance->SocketCull.end()) ServerInstance->SocketCull[this] = this; -- cgit v1.3.1-10-gc9f91