Don't log out player when update aborts a command
recvclient() confused command abortion with an idle timeout. Broken
in commit 08b94556
, v4.3.20.
This commit is contained in:
parent
12b432163c
commit
3e4894c7f5
1 changed files with 11 additions and 7 deletions
|
@ -29,7 +29,7 @@
|
|||
*
|
||||
* Known contributors to this file:
|
||||
* Dave Pare, 1986
|
||||
* Markus Armbruster, 2006-2008
|
||||
* Markus Armbruster, 2006-2009
|
||||
* Ron Koenderink, 2009
|
||||
*/
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
|||
int
|
||||
recvclient(char *cmd, int size)
|
||||
{
|
||||
int count;
|
||||
int count, res;
|
||||
|
||||
count = -1;
|
||||
while (!player->aborted) {
|
||||
|
@ -85,11 +85,15 @@ recvclient(char *cmd, int size)
|
|||
if (player->aborted)
|
||||
break;
|
||||
|
||||
if (io_input(player->iop, IO_WAIT) <= 0) {
|
||||
if (!io_error(player->iop) && !io_eof(player->iop)) {
|
||||
res = io_input(player->iop, IO_WAIT);
|
||||
if (res > 0)
|
||||
;
|
||||
else if (res < 0)
|
||||
player->aborted = player->eof = 1;
|
||||
else if (io_eof(player->iop))
|
||||
player->aborted = player->eof = 1;
|
||||
else if (!player->aborted) {
|
||||
pr_flash(player, "idle connection terminated\n");
|
||||
player->state = PS_SHUTDOWN;
|
||||
}
|
||||
player->aborted = player->eof = 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue