For example if client pipelines FETCH+LOGOUT commands and disconnects during
a large FETCH output, the LOGOUT command is processed as waiting for
unambiguity. This code path however doesn't detect a client disconnection,
and input IO handler is removed so it can't detect it either. So the imap
process hangs.
if (!ret)
break;
}
- if (!client->input->closed && !client->output->closed)
+ if (client->input->closed || client->output->closed)
+ client_destroy(client, NULL);
+ else
client_check_command_hangs(client);
}