From 7e8a5d7323f723f971550dfc9c306ec73787d889 Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 20 Jul 2021 15:59:57 -0600 Subject: [PATCH] LibIPC: Fix losing messages when connection is closed This fixes not processing any messages read up until a connection close is detected. We were returning from the function despite having read some messages. --- Userland/Libraries/LibIPC/Connection.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibIPC/Connection.h b/Userland/Libraries/LibIPC/Connection.h index 19815de71f..a91ede333b 100644 --- a/Userland/Libraries/LibIPC/Connection.h +++ b/Userland/Libraries/LibIPC/Connection.h @@ -197,8 +197,9 @@ protected: if (nread == 0) { if (bytes.is_empty()) { deferred_invoke([this](auto&) { shutdown(); }); + return false; } - return false; + break; } bytes.append(buffer, nread); }