diff options
author | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2014-03-31 16:02:48 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-01 08:35:58 +0200 |
commit | 627853578f77d33b07c7bfb6355920a845131300 (patch) | |
tree | 22b2636beda8d9d4a96936fa6fc3d93605017c52 /src/client/qwaylanddisplay.cpp | |
parent | 8dccc6ca445f5e28d25e6a6148e7389fbc18534f (diff) |
Always bail out when the compositor is closed
errno can both be EPIPE and ECONNRESET when reading from the connection
after the server is closed.
Change-Id: I03b64a382db3de66819277e9955aeca3e2d7f9a1
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index 0b715c0ae..3576c0bd2 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -149,7 +149,7 @@ QWaylandDisplay::~QWaylandDisplay(void) void QWaylandDisplay::flushRequests() { - if (wl_display_dispatch_queue_pending(mDisplay, mEventQueue) == -1 && errno == EPIPE) { + if (wl_display_dispatch_queue_pending(mDisplay, mEventQueue) == -1 && (errno == EPIPE || errno == ECONNRESET)) { qWarning("The Wayland connection broke. Did the Wayland compositor die?"); ::exit(1); } @@ -159,7 +159,7 @@ void QWaylandDisplay::flushRequests() void QWaylandDisplay::blockingReadEvents() { - if (wl_display_dispatch_queue(mDisplay, mEventQueue) == -1 && errno == EPIPE) { + if (wl_display_dispatch_queue(mDisplay, mEventQueue) == -1 && (errno == EPIPE || errno == ECONNRESET)) { qWarning("The Wayland connection broke. Did the Wayland compositor die?"); ::exit(1); } |