From 3d73796aa67e2f510239cec75f5985b577fd39d9 Mon Sep 17 00:00:00 2001 From: Josh Lee Date: Thu, 25 Jan 2024 16:11:13 -0500 Subject: [PATCH] Fix deadlock in blocking_dispatch --- wayland-client/src/event_queue.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wayland-client/src/event_queue.rs b/wayland-client/src/event_queue.rs index 94674bd3747..f3878cf89c7 100644 --- a/wayland-client/src/event_queue.rs +++ b/wayland-client/src/event_queue.rs @@ -472,9 +472,8 @@ impl EventQueue { // // We purposefully ignore the possible error, as that would make us early return in a way that might // lose events, and the potential socket error will be caught in other places anyway. - let _ = backend.backend.dispatch_inner_queue(); + let mut dispatched = backend.backend.dispatch_inner_queue().unwrap_or_default(); - let mut dispatched = 0; while let Some(QueueEvent(cb, msg, odata)) = Self::try_next(&qhandle.inner) { cb(backend, msg, data, odata, qhandle)?; dispatched += 1;