]> git.pond.sub.org Git - empserver/commit
Oops when player thread keeps reading input unsuccessfully
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Jul 2008 02:41:52 +0000 (22:41 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Jul 2008 11:50:20 +0000 (07:50 -0400)
commit49c24d7b78d728f84ab4932572914aab71ddbc1e
treeb341b5d6c88c2c999d6b332a54b550157653a3a5
parentf2294d67a4497a0d686409e7f4b582fef00e567e
Oops when player thread keeps reading input unsuccessfully

Reading input fails after EOF and while the current command is
aborted.  Commands should detect that and fail.  If a command neglects
to do that in a loop, the loop can become infinite.  This is
especially bad after EOF, because then the client might not read
output anymore.  Output gets buffered until memory runs out.

Mitigate such bugs by counting how many calls have failed in a row,
oopsing on the 256th, and sleeping one minute from the 256th on.
include/player.h
src/lib/player/recvclient.c