* Known contributors to this file:
* Dave Pare, 1994
* Steve McClure, 2000
- * Markus Armbruster, 2004-2011
+ * Markus Armbruster, 2004-2012
* Ron Koenderink, 2005-2009
*/
for (;;) {
io_output(player->iop, 1);
if (io_gets(player->iop, buf, sizeof(buf)) < 0) {
- res = io_input(player->iop, 1);
+ res = io_input(player->iop, player->curup + minutes(max_idle));
if (res <= 0) {
if (res == 0 && !io_eof(player->iop))
pr_id(player, C_DATA, "idle connection terminated\n");
player->state = PS_PLAYING;
player_main(player);
logerror("%s logged out, country #%d", praddr(player), player->cnum);
- if (CANT_HAPPEN(!io_eof(player->iop)))
+ if (!io_eof(player->iop) && !io_error(player->iop))
io_set_eof(player->iop);
return RET_OK;
}