From b6b8c9dac8f1a8b2ff2ec53b81d236bfa3dcff6f Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 31 Oct 2006 08:21:35 +0000 Subject: Set flags correctly when receiving a module-requested write event git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5595 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspsocket.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 1e9f3eb5b..c0aed919e 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -437,18 +437,8 @@ bool InspSocket::Poll() return true; break; case I_CONNECTED: - - if (this->WaitingForWriteEvent) - { - /* Trigger the write event */ - n = this->OnWriteReady(); - } - else - { - /* Process the read event */ - n = this->OnDataReady(); - } - return n; + /* Process the read event */ + return this->OnDataReady(); break; default: break; @@ -502,6 +492,7 @@ void InspSocket::HandleEvent(EventType et) case EVENT_WRITE: if (this->WaitingForWriteEvent) { + this->WaitingForWriteEvent = false; if (!this->OnWriteReady()) { this->Instance->SE->DelFd(this); -- cgit v1.2.3