Mercurial > dovecot > core-2.2
changeset 19412:26c565042d9d
imap: Fixed hanging if a pipelined IMAP command was waiting for previous command to sync.
..And the previous command was waiting for the next command to finish before
it would start syncing. For example FETCH+LOGOUT pipelined.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 24 Nov 2015 11:50:15 +0200 |
parents | 0e05efd14b39 |
children | 8d9b48c59490 |
files | src/imap/imap-client.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/imap-client.c Tue Nov 24 11:15:47 2015 +0200 +++ b/src/imap/imap-client.c Tue Nov 24 11:50:15 2015 +0200 @@ -1016,8 +1016,14 @@ if (!handled_commands) return FALSE; - if (client->input_lock == NULL) + if (client->input_lock == NULL) { + /* finished handling all commands. sync them all at once now. */ cmd_sync_delayed(client); + } else if (client->input_lock->state == CLIENT_COMMAND_STATE_WAIT_UNAMBIGUITY) { + /* the command may be waiting for previous command to sync. */ + if (cmd_sync_delayed(client)) + client_continue_pending_input(client); + } return TRUE; }