/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
if (player->aborted)
break;
- /* Await more input */
- io_input(player->iop, IO_WAIT);
- if (io_error(player->iop) || io_eof(player->iop))
+ if (io_input(player->iop, IO_WAIT) <= 0) {
+ if (!io_error(player->iop) && !io_eof(player->iop)) {
+ pr_flash(player, "idle connection terminated\n");
+ player->state = PS_SHUTDOWN;
+ }
player->aborted = player->eof = 1;
+ }
}
if (player->aborted) {