Commit 5c18e4f1 authored by Max Kellermann's avatar Max Kellermann

event/FullyBufferedSocket: remove obsolete TODO comment

We have a better solution now.
parent fd2eafa7
......@@ -89,22 +89,6 @@ FullyBufferedSocket::Write(const void *data, size_t length)
if (length == 0)
return true;
#if 0
/* TODO: disabled because this would add overhead on some callers (the ones that often), but it may be useful */
if (output.IsEmpty()) {
/* try to write it directly first */
const auto nbytes = DirectWrite(data, length);
if (gcc_likely(nbytes > 0)) {
data = (const uint8_t *)data + nbytes;
length -= nbytes;
if (length == 0)
return true;
} else if (nbytes < 0)
return false;
}
#endif
const bool was_empty = output.IsEmpty();
if (!output.Append(data, length)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment