diff options
Diffstat (limited to 'Userland/Libraries/LibCore/EventLoop.cpp')
-rw-r--r-- | Userland/Libraries/LibCore/EventLoop.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Userland/Libraries/LibCore/EventLoop.cpp b/Userland/Libraries/LibCore/EventLoop.cpp index c72784da63..0c79cce1d5 100644 --- a/Userland/Libraries/LibCore/EventLoop.cpp +++ b/Userland/Libraries/LibCore/EventLoop.cpp @@ -162,31 +162,31 @@ private: #ifdef __serenity__ m_socket->on_ready_to_read = [this] { u32 length; - auto maybe_nread = m_socket->read({ (u8*)&length, sizeof(length) }); - if (maybe_nread.is_error()) { - dbgln("InspectorServerConnection: Failed to read message length from inspector server connection: {}", maybe_nread.error()); + auto maybe_bytes_read = m_socket->read({ (u8*)&length, sizeof(length) }); + if (maybe_bytes_read.is_error()) { + dbgln("InspectorServerConnection: Failed to read message length from inspector server connection: {}", maybe_bytes_read.error()); shutdown(); return; } - auto nread = maybe_nread.release_value(); - if (nread == 0) { + auto bytes_read = maybe_bytes_read.release_value(); + if (bytes_read.is_empty()) { dbgln_if(EVENTLOOP_DEBUG, "RPC client disconnected"); shutdown(); return; } - VERIFY(nread == sizeof(length)); + VERIFY(bytes_read.size() == sizeof(length)); auto request_buffer = ByteBuffer::create_uninitialized(length).release_value(); - maybe_nread = m_socket->read(request_buffer.bytes()); - if (maybe_nread.is_error()) { - dbgln("InspectorServerConnection: Failed to read message content from inspector server connection: {}", maybe_nread.error()); + maybe_bytes_read = m_socket->read(request_buffer.bytes()); + if (maybe_bytes_read.is_error()) { + dbgln("InspectorServerConnection: Failed to read message content from inspector server connection: {}", maybe_bytes_read.error()); shutdown(); return; } - nread = maybe_nread.release_value(); + bytes_read = maybe_bytes_read.release_value(); auto request_json = JsonValue::from_string(request_buffer); if (request_json.is_error() || !request_json.value().is_object()) { |