mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-07 04:06:07 -05:00
wayland: attempt to log protocol errors on failure to flush
When failing to flush, and the error is EPIPE, attempt to read and dispatch events. This ensures protocol errors are logged.
This commit is contained in:
parent
237db6e771
commit
5080e271c2
1 changed files with 8 additions and 1 deletions
|
|
@ -2247,7 +2247,14 @@ wayl_flush(struct wayland *wayl)
|
|||
}
|
||||
|
||||
if (errno != EAGAIN) {
|
||||
LOG_ERRNO("failed to flush wayland socket");
|
||||
const int saved_errno = errno;
|
||||
|
||||
if (errno == EPIPE) {
|
||||
wl_display_read_events(wayl->display);
|
||||
wl_display_dispatch_pending(wayl->display);
|
||||
}
|
||||
|
||||
LOG_ERRNO_P(saved_errno, "failed to flush wayland socket");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue