From 9172f9d22ce7b1f0677d7bf430f2bca93e4076d4 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 11 Dec 2006 22:20:03 +0000 Subject: 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 --- src/inspsocket.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/inspsocket.cpp') 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) { -- cgit v1.2.3