dovecot-2.0-sslstream: lmtp proxy: Stalling remote servers weren...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Feb 13 02:56:41 EET 2010
details: http://hg.dovecot.org/dovecot-2.0-sslstream/rev/4eadbf965d1f
changeset: 10394:4eadbf965d1f
user: Timo Sirainen <tss at iki.fi>
date: Mon Nov 23 15:43:33 2009 -0500
description:
lmtp proxy: Stalling remote servers weren't detected correctly.
diffstat:
1 file changed, 10 insertions(+), 8 deletions(-)
src/lmtp/lmtp-proxy.c | 18 ++++++++++--------
diffs (35 lines):
diff -r 9d878b1dc028 -r 4eadbf965d1f src/lmtp/lmtp-proxy.c
--- a/src/lmtp/lmtp-proxy.c Mon Nov 23 15:42:55 2009 -0500
+++ b/src/lmtp/lmtp-proxy.c Mon Nov 23 15:43:33 2009 -0500
@@ -374,6 +374,16 @@ static bool lmtp_proxy_data_read(struct
timeout_reset(proxy->to_data_idle);
switch (i_stream_read(proxy->data_input)) {
+ case 0:
+ if (!tee_i_stream_child_is_waiting(proxy->data_input)) {
+ /* nothing new read */
+ if (proxy->io != NULL)
+ return FALSE;
+ proxy->io = io_add(i_stream_get_fd(proxy->data_input),
+ IO_READ,
+ lmtp_proxy_data_input, proxy);
+ }
+ /* fall through */
case -2:
/* buffer full. someone's stalling. */
lmtp_proxy_wait_for_output(proxy);
@@ -389,14 +399,6 @@ static bool lmtp_proxy_data_read(struct
lmtp_proxy_try_finish(proxy);
}
return FALSE;
- case 0:
- /* nothing new read */
- if (proxy->io == NULL) {
- proxy->io = io_add(i_stream_get_fd(proxy->data_input),
- IO_READ,
- lmtp_proxy_data_input, proxy);
- }
- return FALSE;
default:
/* something was read */
(void)i_stream_get_data(proxy->data_input, &size);
More information about the dovecot-cvs
mailing list