From: special Date: Thu, 13 Sep 2007 11:54:24 +0000 (+0000) Subject: Fixed a rare infinite loop in InspSocket::FlushWriteBuffer() - this could only affect... X-Git-Tag: v2.0.23~4573 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=15f624f682e73d61bf46ef60fe4f4d7a9dda3e8e;p=user%2Fhenk%2Fcode%2Finspircd.git Fixed a rare infinite loop in InspSocket::FlushWriteBuffer() - this could only affect a few rarely used modules, and is difficult to trigger. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8031 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index fb0b207b6..98c9d3baa 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -500,6 +500,12 @@ bool InspSocket::FlushWriteBuffer() errno = EAGAIN; } } + else if (result == 0) + { + this->Instance->SE->DelFd(this); + this->Close(); + return true; + } else if ((result == -1) && (errno != EAGAIN)) { this->OnError(I_ERR_WRITE);