Don't block when flushing a full protocol buffer
authorKristian Høgsberg <krh@bitplanet.net>
Wed, 29 Feb 2012 16:07:48 +0000 (11:07 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 29 Feb 2012 16:07:48 +0000 (11:07 -0500)
commitb26774da5b907a71aa7c72ee1feb6dcde92b9fcb
tree20baf988f33a0ddde7f4f1df2a810bc7f140f1db
parentbf53f2033d0f39bab59da783f5b13f9e3bfe7073
Don't block when flushing a full protocol buffer

In case the client isn't responding, this will block the compositor.
Instead we flush with MSG_DONTWAIT, which lets us fill up the kernel buffer
as much as we can (after not returning EPOLLOUT anymore it still can take
80k more), and then disconnect the client if we get EAGAIN.
src/connection.c
src/wayland-client.c
src/wayland-private.h
src/wayland-server.c