From 15f624f682e73d61bf46ef60fe4f4d7a9dda3e8e Mon Sep 17 00:00:00 2001 From: special Date: Thu, 13 Sep 2007 11:54:24 +0000 Subject: [PATCH] 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 --- src/inspsocket.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.39.5