cmd_sync_delayed(client);
o_stream_uncork(client->output);
- if (client->disconnected)
- client_destroy(client, NULL);
- else
- client_continue_pending_input(client);
+ client_continue_pending_input(client);
}
static void cmd_append_finish(struct cmd_append_context *ctx)
{
struct client *client = ctx->client;
- if (idle_client_input_more(ctx)) {
- if (client->disconnected)
- client_destroy(client, NULL);
- else
- client_continue_pending_input(client);
- }
+ if (idle_client_input_more(ctx))
+ client_continue_pending_input(client);
}
static void keepalive_timeout(struct cmd_idle_context *ctx)
{
i_assert(!client->handling_input);
+ if (client->disconnected) {
+ client_destroy(client, NULL);
+ return;
+ }
+
/* this function is called at the end of I/O callbacks (and only there).
fix up the command states and verify that they're correct. */
while (client_remove_pending_unambiguity(client)) {
o_stream_unref(&output);
imap_refresh_proctitle();
- if (client->disconnected)
- client_destroy(client, NULL);
- else
- client_continue_pending_input(client);
+ client_continue_pending_input(client);
}
static void client_output_cmd(struct client_command_context *cmd)
client_command_free(&cmd);
cmd_sync_delayed(client);
- if (client->disconnected)
- client_destroy(client, NULL);
- else
- client_continue_pending_input(client);
+ client_continue_pending_input(client);
}
int cmd_search_parse_return_if_found(struct imap_search_context *ctx,
/* we could have already handled LOGOUT, or we might need to continue
pending ambiguous commands. */
- if (client->disconnected)
- client_destroy(client, NULL);
- else
- client_continue_pending_input(client);
+ client_continue_pending_input(client);
}
int client_create_from_input(const struct mail_storage_service_input *input,