summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-11 22:20:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-11 22:20:03 +0000
commit9172f9d22ce7b1f0677d7bf430f2bca93e4076d4 (patch)
treec6db883794b0486ba883909d1289d9db0d4a93cc
parenta7ee287feae827706ed4e2983abdfff7f1ed3ce0 (diff)
Fix EOF conditions on inspsockets which are having their write() handled by modules
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5947 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspsocket.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 6987d5ccd..941063718 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -390,6 +390,15 @@ bool InspSocket::FlushWriteBuffer()
this->Close();
return true;
}
+ else if (result == 0)
+ {
+ this->Instance->Log(DEBUG,"Write error on socket: EOF");
+ this->OnError(I_ERR_WRITE);
+ this->state = I_ERROR;
+ this->Instance->SE->DelFd(this);
+ this->Close();
+ return true;
+ }
}
catch (ModuleException& modexcept)
{