mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
client: Delay EPIPE handling so we get a chance to handle error events
This commit is contained in:
parent
1bf13ae918
commit
051f3838de
1 changed files with 5 additions and 2 deletions
|
|
@ -44,7 +44,6 @@
|
|||
#include "wayland-client.h"
|
||||
#include "wayland-private.h"
|
||||
|
||||
|
||||
/** \cond */
|
||||
|
||||
enum wl_proxy_flag {
|
||||
|
|
@ -1318,8 +1317,12 @@ wl_display_dispatch_queue(struct wl_display *display,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* We ignore EPIPE here, so that we try to read events before
|
||||
* returning an error. When the compositor sends an error it
|
||||
* will close the socket, and if we bail out here we don't get
|
||||
* a chance to process the error. */
|
||||
ret = wl_connection_flush(display->connection);
|
||||
if (ret < 0 && errno != EAGAIN) {
|
||||
if (ret < 0 && errno != EAGAIN && errno != EPIPE) {
|
||||
display_fatal_error(display, errno);
|
||||
goto err_unlock;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue