From 44f672bacf6779f6bbe5972d84e210f953f14598 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 21 Sep 2024 15:36:45 +0200 Subject: [PATCH] LibIPC: Handle spurious wake-ups on the send queue thread Fixes #1441 --- Userland/Libraries/LibIPC/Connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibIPC/Connection.cpp b/Userland/Libraries/LibIPC/Connection.cpp index 227bf63ae5d..2c52008bc80 100644 --- a/Userland/Libraries/LibIPC/Connection.cpp +++ b/Userland/Libraries/LibIPC/Connection.cpp @@ -35,7 +35,7 @@ ConnectionBase::ConnectionBase(IPC::Stub& local_stub, NonnullOwnPtr intptr_t { for (;;) { queue->mutex.lock(); - if (queue->messages.is_empty()) + while (queue->messages.is_empty() && queue->running) queue->condition.wait(); if (!queue->running) {