Make send overflow disconnect instead of abort
Submitted by Pekka Paalanen
Assigned to Pekka Paalanen
Request sending functions do not return a code, so they have no way of failing gracefully. If the send buffer is full, libwayland-client attemps an automatic flush. If the flush fails, there is no place to store the request, so it aborts which crashes the whole program.
It would be more friendly to the program to just kill the Wayland connection instead. The program will notice the failure once it returns to its main loop, giving it a chance to save its work or even try reconnecting.
While at it, check that the server-side event sending functions do the same instead of aborting.