From 4e4da3f9dba948bcb90ab9ca27415010b6cabeb5 Mon Sep 17 00:00:00 2001 From: special Date: Thu, 13 Sep 2007 11:55:15 +0000 Subject: 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/branches/1_1_stable@8032 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspsocket.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/inspsocket.cpp') diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index e372a4472..d2f432178 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -508,6 +508,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); -- cgit v1.3.1-10-gc9f91