Skip to content

Commit

Permalink
ws: Do not block on wl_event_loop_dispatch()
Browse files Browse the repository at this point in the history
Instruct wl_display_get_event_loop() to not block by passing
zero as timeout, instead of letting it block indefinitely.

Fixes #94
  • Loading branch information
aperezdc committed Mar 2, 2020
1 parent b01aa03 commit d3b5da7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ws.cpp
Expand Up @@ -117,7 +117,7 @@ GSourceFuncs ServerSource::s_sourceFuncs = {

if (source.pfd.revents & G_IO_IN) {
struct wl_event_loop* eventLoop = wl_display_get_event_loop(source.display);
wl_event_loop_dispatch(eventLoop, -1);
wl_event_loop_dispatch(eventLoop, 0);
wl_display_flush_clients(source.display);
}

Expand Down

0 comments on commit d3b5da7

Please sign in to comment.