]> git.pond.sub.org Git - empserver/commit
Base idle timeout on player->curup again, not current time
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 10 Mar 2012 12:51:39 +0000 (13:51 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 27 Mar 2012 15:23:18 +0000 (17:23 +0200)
commited1cbc97e66405d9bf7639f56fe4f2f98a2961c0
treefdc8eca20db194269b5ee5ab2e1ae4cad666e617
parenta96b400da338861e6baa8ef6025b15ff46e924e0
Base idle timeout on player->curup again, not current time

Idle timeout used to expire max_idle minutes after the last
player->curup update.  When we got rid of the idle thread in commit
08b94556 (v4.3.20), this got changed to "wait no more than max_idle
minutes for input".  Time spent computing and time spent blocked on
output no longer counts.  In particular, a connection can block
indefinitely on output since then.  Let's fix that.

Start with basing the input timeout on player->curup again.  The
missing output timeout will be added shortly.

Aside: since status() updates player->curup, the idle timer gets reset
when the update aborts a command.  Left for another day.
include/empio.h
src/lib/empthread/io.c
src/lib/player/accept.c
src/lib/player/login.c
src/lib/player/recvclient.c