]> git.pond.sub.org Git - empserver/commit
Fix io_close() to obey deadline for output, too
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 11 Mar 2012 09:06:04 +0000 (10:06 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 26 Apr 2012 17:43:41 +0000 (19:43 +0200)
commit5ce099f6717479dad4c293583caf5568c9d729e6
tree43ddf32f9f9921185fdd551fd9b8eef180d195bd
parent7a3cbf037a79f837ebaca08a556ea770d8c8464e
Fix io_close() to obey deadline for output, too

A client can delay thread exit indefinitely by not reading output.
Broken in commit 08b94556 (v4.3.20) "Reimplement max_idle without a
separate thread".  Until then, the idle thread aborted a stuck attempt
to flush output.

Denial of service seems possible.

Note that commit 904822e3 moved flushing the output queue from
player_login() to io_close().  It also made io_close() wait for the
client to close the connection.  That wait obeys the deadline.
src/lib/empthread/io.c