Skip to content

Commit

Permalink
Fix deadlock in blocking_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jleedev authored and elinorbgr committed Jan 29, 2024
1 parent 2d5e7df commit 3d73796
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions wayland-client/src/event_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,8 @@ impl<State> EventQueue<State> {
//
// 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;
Expand Down

0 comments on commit 3d73796

Please sign in to comment.