dovecot-2.2: login proxy: Set a default 30s timeout.

dovecot at dovecot.org dovecot at dovecot.org
Thu Mar 21 23:51:27 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/9439a43bd645
changeset: 16086:9439a43bd645
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Mar 21 23:51:16 2013 +0200
description:
login proxy: Set a default 30s timeout.

diffstat:

 src/login-common/client-common-auth.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (20 lines):

diff -r a4ea6946c621 -r 9439a43bd645 src/login-common/client-common-auth.c
--- a/src/login-common/client-common-auth.c	Thu Mar 21 23:50:53 2013 +0200
+++ b/src/login-common/client-common-auth.c	Thu Mar 21 23:51:16 2013 +0200
@@ -15,6 +15,7 @@
 #include <stdlib.h>
 
 #define PROXY_FAILURE_MSG "Account is temporarily unavailable."
+#define PROXY_DEFAULT_TIMEOUT_MSECS (1000*30)
 
 /* If we've been waiting auth server to respond for over this many milliseconds,
    send a "waiting" message. */
@@ -307,6 +308,8 @@
 		proxy_set.ip.family = 0;
 	proxy_set.port = reply->port;
 	proxy_set.connect_timeout_msecs = reply->proxy_timeout_msecs;
+	if (proxy_set.connect_timeout_msecs == 0)
+		proxy_set.connect_timeout_msecs = PROXY_DEFAULT_TIMEOUT_MSECS;
 	proxy_set.notify_refresh_secs = reply->proxy_refresh_secs;
 	proxy_set.ssl_flags = reply->ssl_flags;
 


More information about the dovecot-cvs mailing list