Mercurial > dovecot > original-hg > dovecot-1.2
diff src/imap/client.c @ 3601:edc6e213048f HEAD
client_send_line(): Try flushing output immediately if buffer gets full.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 24 Sep 2005 12:47:58 +0300 |
parents | 7e39590da48a |
children | 454863612b5c |
line wrap: on
line diff
--- a/src/imap/client.c Fri Sep 23 16:28:40 2005 +0300 +++ b/src/imap/client.c Sat Sep 24 12:47:58 2005 +0300 @@ -117,8 +117,12 @@ if (o_stream_sendv(client->output, iov, 2) < 0) return -1; - return o_stream_get_buffer_used_size(client->output) < - CLIENT_OUTPUT_OPTIMAL_SIZE; + if (o_stream_get_buffer_used_size(client->output) >= + CLIENT_OUTPUT_OPTIMAL_SIZE) { + /* buffer full, try flushing */ + return o_stream_flush(client->output); + } + return 1; } void client_send_tagline(struct client_command_context *cmd, const char *data)