diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2025-05-02 11:46:18 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2025-05-02 11:46:18 +0000 |
| commit | 5080e271c2fa5899ccb37384c26491e025b225ca (patch) | |
| tree | 48ce46b4773bba729b4f2ded4b4d96025145d63d | |
| parent | wayland: always call wl_display_dispatch_pending() at least once, after reading (diff) | |
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.
| -rw-r--r-- | wayland.c | 9 |
1 files changed, 8 insertions, 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; } |
