(recvclient): Fix race condition: when io_output_all() blocked, then
got unblocked by command abortion, it could then block in io_input().
This commit is contained in:
parent
b2ec71c50e
commit
49941ef169
1 changed files with 2 additions and 0 deletions
|
@ -62,6 +62,8 @@ recvclient(char *cmd, int size)
|
|||
count = io_gets(player->iop, cmd, size);
|
||||
while (!player->aborted && count < 0) {
|
||||
io_output_all(player->iop);
|
||||
if (player->aborted)
|
||||
return -2;
|
||||
io_input(player->iop, IO_WAIT);
|
||||
if (io_error(player->iop))
|
||||
player->aborted++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue