summaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
authorGravatar brain2006-04-04 17:32:59 +0000
committerGravatar brain2006-04-04 17:32:59 +0000
commitb45e144722f96c89cfe6bcddbbd1f330e71ca636 (patch)
tree1db112a37c5c46c14a992e4b4129452651163347 /src/socket.cpp
parentRemove irritating compile warning on m_spanningtree that I forgot to backport... (diff)
Backport of fixes
git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@3833 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp6
1 files changed, 4 insertions, 2 deletions
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;