aboutsummaryrefslogtreecommitdiff
path: root/src/event/BufferedSocket.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/BufferedSocket.cxx')
-rw-r--r--src/event/BufferedSocket.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/event/BufferedSocket.cxx b/src/event/BufferedSocket.cxx
index b95519e4..dec60b5f 100644
--- a/src/event/BufferedSocket.cxx
+++ b/src/event/BufferedSocket.cxx
@@ -202,21 +202,21 @@ BufferedSocket::ConsumeInput(size_t nbytes)
fifo_buffer_consume(input, nbytes);
}
-void
+bool
BufferedSocket::OnSocketReady(unsigned flags)
{
assert(IsDefined());
if (gcc_unlikely(flags & (ERROR|HANGUP))) {
OnSocketClosed();
- return;
+ return false;
}
if (flags & READ) {
assert(input == nullptr || !fifo_buffer_is_full(input));
if (!ReadToBuffer() || !ResumeInput())
- return;
+ return false;
if (input == nullptr || !fifo_buffer_is_full(input))
ScheduleRead();
@@ -233,6 +233,8 @@ BufferedSocket::OnSocketReady(unsigned flags)
assert(!output.IsEmpty());
if (!WriteFromBuffer())
- return;
+ return false;
}
+
+ return true;
}