if (client->to_idle_output != NULL)
timeout_reset(client->to_idle_output);
+ o_stream_cork(client->output);
if ((ret = o_stream_flush(client->output)) < 0) {
client_destroy(client, NULL);
return 1;
for (cmd = client->command_queue; cmd != NULL; cmd = cmd->next)
cmd->temp_executed = FALSE;
- o_stream_cork(client->output);
if (client->output_lock != NULL) {
client->output_lock->temp_executed = TRUE;
client_output_cmd(client->output_lock);
static int client_output(struct client *client)
{
+ o_stream_cork(client->output);
if (o_stream_flush(client->output) < 0) {
client_destroy(client, NULL);
return 1;
if (client->to_commit != NULL)
timeout_reset(client->to_commit);
- if (client->cmd != NULL) {
- o_stream_cork(client->output);
+ if (client->cmd != NULL)
client->cmd(client);
- o_stream_uncork(client->output);
- }
if (client->cmd == NULL) {
if (o_stream_get_buffer_used_size(client->output) <
client_input(client);
}
+ o_stream_uncork(client->output);
return client->cmd == NULL;
}