gri3-wm/testcases
Orestis Floros 37d0105c83
Kill misbehaving subscribed clients instead of hanging
This change only affects clients that are subscribed to events, which
should be the main cause of our problems.

In the common case (no buffered data) the behaviour doesn't change at
all: the message is sent directly, no ev_io / ev_timeout callback is
enabled. Once a write to a client's socket is not completed fully
(returns with EAGAIN error), we put the message in the tail of a queue
and init an ev_io callback and a corresponding timer. If the timer is
triggered first, the socket is closed and the client connection is
removed. If the socket becomes writeable before the timeout we either
reset the timer if we couldn't push all the buffered data or completely
remove it if everything was pushed.

We could also replace ipc_send_message() for all client connections in
i3, not just those subscribed to events.

Furthermore, we could limit the amount of messages stored and increase
the timeout (or use multiple timeouts): eg it's ok if a client is not
reading for 10 seconds and we are only holding 5KB of messages for them
but it is not ok if they are inactive for 5 seconds and we have 30MB of
messages held.

Closes #2999
Closes #2539
2018-08-08 19:14:56 +03:00
..
lib Move get_output_for_workspace() to i3test 2018-06-27 14:56:50 +03:00
t Kill misbehaving subscribed clients instead of hanging 2018-08-08 19:14:56 +03:00
.gitignore Testcases: Use Xephyr instead of XDummy 2014-10-02 23:05:00 +02:00
Makefile.PL testcases/Makefile.PL: tell MakeMaker this is a pure-Perl distribution (#2922) 2017-09-10 11:25:43 +02:00
complete-run.pl.in complete-run.pl: accept the xvfb option from command line 2017-12-05 00:22:14 +02:00
i3-test.config Extend the fullscreen command 2014-12-10 20:42:52 +01:00
inject_randr1.5.c WIFEXITED needs sys/wait.h (#2989) 2017-09-25 09:11:15 -07:00
new-test Replace http:// with https:// where applicable 2017-09-24 10:19:07 +02:00
restart-state.golden tests: implement restart testing (actual option still missing) 2011-12-21 23:15:30 +00:00
valgrind.supp Add valgrind suppression file to testcases 2014-03-10 17:37:41 +01:00