summaryrefslogtreecommitdiff
path: root/Userland/Services/EchoServer/Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Services/EchoServer/Client.cpp')
-rw-r--r--Userland/Services/EchoServer/Client.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Services/EchoServer/Client.cpp b/Userland/Services/EchoServer/Client.cpp
index 0a3ae489ba..2538ffa24f 100644
--- a/Userland/Services/EchoServer/Client.cpp
+++ b/Userland/Services/EchoServer/Client.cpp
@@ -30,16 +30,16 @@ ErrorOr<void> Client::drain_socket()
auto buffer = TRY(ByteBuffer::create_uninitialized(1024));
while (TRY(m_socket->can_read_without_blocking())) {
- auto nread = TRY(m_socket->read(buffer));
+ auto bytes_read = TRY(m_socket->read(buffer));
- dbgln("Read {} bytes.", nread);
+ dbgln("Read {} bytes.", bytes_read.size());
if (m_socket->is_eof()) {
Core::deferred_invoke([this, strong_this = NonnullRefPtr(*this)] { quit(); });
break;
}
- TRY(m_socket->write({ buffer.data(), nread }));
+ TRY(m_socket->write(bytes_read));
}
return {};