diff --git a/Libraries/LibIPC/ClientConnection.h b/Libraries/LibIPC/ClientConnection.h index d1a7803425..0a821cd296 100644 --- a/Libraries/LibIPC/ClientConnection.h +++ b/Libraries/LibIPC/ClientConnection.h @@ -121,7 +121,8 @@ public: return; default: perror("Connection::post_message write"); - ASSERT_NOT_REACHED(); + shutdown(); + return; } } @@ -130,6 +131,9 @@ public: void drain_messages_from_client() { + if (!m_socket->is_open()) + return; + Vector bytes; for (;;) { u8 buffer[4096]; @@ -143,7 +147,8 @@ public: } if (nread < 0) { perror("recv"); - ASSERT_NOT_REACHED(); + shutdown(); + return; } bytes.append(buffer, nread); }