Fix recvclient() to obey max_idle for output, too
recvclient() flushes the output queue before receiving input. The
receive obeys max_idle, the flush doesn't.
Broken in commit 08b94556
(v4.3.20) "Reimplement max_idle without a
separate thread". Until then, the idle thread aborted a stuck attempt
to flush output.
This commit is contained in:
parent
7cca82578d
commit
4d59881505
1 changed files with 3 additions and 2 deletions
|
@ -81,8 +81,9 @@ recvclient(char *cmd, int size)
|
|||
* Flush all queued output before potentially sleeping in
|
||||
* io_input(), to make sure player sees the prompt.
|
||||
*/
|
||||
deadline = (time_t)(player->may_sleep >= PLAYER_SLEEP_ON_INPUT
|
||||
? -1 : 0);
|
||||
deadline = player->curup + minutes(max_idle);
|
||||
if (player->may_sleep < PLAYER_SLEEP_ON_INPUT)
|
||||
deadline = 0;
|
||||
while (io_output(player->iop, deadline) > 0)
|
||||
;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue