aboutsummaryrefslogtreecommitdiffstats
path: root/src/event/FullyBufferedSocket.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/event/FullyBufferedSocket.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/event/FullyBufferedSocket.cxx b/src/event/FullyBufferedSocket.cxx
index 8b57b1308..375132e34 100644
--- a/src/event/FullyBufferedSocket.cxx
+++ b/src/event/FullyBufferedSocket.cxx
@@ -20,9 +20,9 @@
#include "config.h"
#include "FullyBufferedSocket.hxx"
#include "system/SocketError.hxx"
-#include "util/fifo_buffer.h"
#include "util/Error.hxx"
#include "util/Domain.hxx"
+#include "Compiler.h"
#include <assert.h>
#include <stdint.h>
@@ -59,15 +59,14 @@ FullyBufferedSocket::Flush()
{
assert(IsDefined());
- size_t length;
- const void *data = output.Read(&length);
- if (data == nullptr) {
+ const auto data = output.Read();
+ if (data.IsEmpty()) {
IdleMonitor::Cancel();
CancelWrite();
return true;
}
- auto nbytes = DirectWrite(data, length);
+ auto nbytes = DirectWrite(data.data, data.size);
if (gcc_unlikely(nbytes <= 0))
return nbytes == 0;