dovecot-2.2: lmtp: Reduce corking so we get command replies more...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Jun 27 11:25:23 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/cfc2670398d7
changeset: 17524:cfc2670398d7
user: Timo Sirainen <tss at iki.fi>
date: Fri Jun 27 14:23:46 2014 +0300
description:
lmtp: Reduce corking so we get command replies more quickly even if they are pipelined.
This may help avoid some LMTP client timeouts.
diffstat:
src/lmtp/client.c | 4 ++--
src/lmtp/commands.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 1b9356dbfca2 -r cfc2670398d7 src/lmtp/client.c
--- a/src/lmtp/client.c Fri Jun 27 14:06:56 2014 +0300
+++ b/src/lmtp/client.c Fri Jun 27 14:23:46 2014 +0300
@@ -122,15 +122,15 @@
output = client->output;
o_stream_ref(output);
- o_stream_cork(output);
while ((line = i_stream_next_line(client->input)) != NULL) {
T_BEGIN {
+ o_stream_cork(output);
ret = client_input_line(client, line);
+ o_stream_uncork(output);
} T_END;
if (ret < 0)
break;
}
- o_stream_uncork(output);
o_stream_unref(&output);
}
diff -r 1b9356dbfca2 -r cfc2670398d7 src/lmtp/commands.c
--- a/src/lmtp/commands.c Fri Jun 27 14:06:56 2014 +0300
+++ b/src/lmtp/commands.c Fri Jun 27 14:23:46 2014 +0300
@@ -1062,6 +1062,8 @@
i_assert(client->dot_input == NULL);
client->dot_input = i_stream_create_dot(client->input, TRUE);
client_send_line(client, "354 OK");
+ /* send the DATA reply immediately before we start handling any data */
+ o_stream_uncork(client->output);
io_remove(&client->io);
client_state_set(client, "DATA");
More information about the dovecot-cvs
mailing list