dovecot-2.2: lib-http: Treat connect() timeouts as retryable err...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 6 06:33:13 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/452cecc7e708
changeset: 16460:452cecc7e708
user: Timo Sirainen <tss at iki.fi>
date: Thu Jun 06 06:32:58 2013 +0300
description:
lib-http: Treat connect() timeouts as retryable errors.
diffstat:
src/lib-http/http-client-connection.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (26 lines):
diff -r 554774a328b9 -r 452cecc7e708 src/lib-http/http-client-connection.c
--- a/src/lib-http/http-client-connection.c Thu Jun 06 05:58:16 2013 +0300
+++ b/src/lib-http/http-client-connection.c Thu Jun 06 06:32:58 2013 +0300
@@ -320,16 +320,18 @@
if (conn->connected_timestamp.tv_sec == 0) {
msecs = timeval_diff_msecs(&ioloop_timeval,
&conn->connect_start_timestamp);
- http_client_peer_connection_failure(conn->peer, t_strdup_printf(
+ error = t_strdup_printf(
"connect(%s) failed: Connection timed out in %u.%03u secs",
- _conn->name, msecs/1000, msecs%1000));
+ _conn->name, msecs/1000, msecs%1000);
} else {
msecs = timeval_diff_msecs(&ioloop_timeval,
&conn->connected_timestamp);
- http_client_peer_connection_failure(conn->peer, t_strdup_printf(
+ error = t_strdup_printf(
"SSL handshaking to %s failed: Connection timed out in %u.%03u secs",
- _conn->name, msecs/1000, msecs%1000));
+ _conn->name, msecs/1000, msecs%1000);
}
+ http_client_connection_retry_requests(conn,
+ HTTP_CLIENT_REQUEST_ERROR_TIMED_OUT, error);
break;
case CONNECTION_DISCONNECT_CONN_CLOSED:
/* retry pending requests if possible */
More information about the dovecot-cvs
mailing list