summaryrefslogtreecommitdiff
path: root/src/inspsocket.cpp
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-09-13 11:54:24 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-09-13 11:54:24 +0000
commit15f624f682e73d61bf46ef60fe4f4d7a9dda3e8e (patch)
tree76a3011a2da091fb70d1d8771af2a9213bdbbaa9 /src/inspsocket.cpp
parent7491795c3ded8850cee25f387f7be5363abaccfb (diff)
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
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r--src/inspsocket.cpp6
1 files changed, 6 insertions, 0 deletions
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);