server: stop wl_display_run() on dispatch error
If wl_event_loop_dispatch() fails, we could enter an infinite loop, repeatedly calling a failing wl_event_loop_dispatch() forever. Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
parent
0e0ae7e290
commit
8f2a33cffc
|
@ -1490,7 +1490,9 @@ wl_display_run(struct wl_display *display)
|
|||
|
||||
while (display->run) {
|
||||
wl_display_flush_clients(display);
|
||||
wl_event_loop_dispatch(display->loop, -1);
|
||||
if (wl_event_loop_dispatch(display->loop, -1) < 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user