From b45e144722f96c89cfe6bcddbbd1f330e71ca636 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 4 Apr 2006 17:32:59 +0000 Subject: Backport of fixes git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@3833 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socket.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/socket.cpp') diff --git a/src/socket.cpp b/src/socket.cpp index 7df669503..930772eb5 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -306,7 +306,7 @@ bool InspSocket::FlushWriteBuffer() } } } - return false; + return (fd < 0); } bool InspSocket::Timeout(time_t current) @@ -380,7 +380,9 @@ bool InspSocket::Poll() * Both FlushWriteBuffer AND the return result of OnDataReady must * return true for this to be ok. */ - return (n && !this->FlushWriteBuffer()); + if (this->FlushWriteBuffer()) + return false; + return n; break; default: break; -- cgit v1.3.1-10-gc9f91