From 74e622fbfa004b3c3363fc7bc83ae322c4eb3c5c Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 7 Sep 2006 16:56:40 +0000 Subject: Delete the file descriptor upon write error to an inspsocket, preventing it eating cpu with endless read events git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5154 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspsocket.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index d1dc1ce6b..fb9238a97 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -356,6 +356,8 @@ bool InspSocket::FlushWriteBuffer() this->Instance->Log(DEBUG,"Write error on socket: %s",strerror(errno)); this->OnError(I_ERR_WRITE); this->state = I_ERROR; + ServerInstance->SE->DelFd(this->sock); + this->sock->Close(); return true; } } -- cgit v1.2.3