quit_cmd() calls io_shutdown() to make player_login()'s next command
read detect EOF. io_shutdown() drains the input queue and shuts down
the socket with shutdown(). player_login()'s next io_gets() fails all
right, but then io_input() *can* read more from the socket on my Linux
box, at least when I send plenty of input fast. Thus, we ignore
whatever input after quit was already queued, then resume reading
commands, not necessarily at the beginning of a line.
Fix by setting the EOF indicator instead.
static int
quit_cmd(void)
{
- io_shutdown(player->iop, IO_READ);
+ io_set_eof(player->iop);
return RET_OK;
}