dovecot-2.2: lib-http: Fixed previous patch setting connection c...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 6 05:58:26 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/554774a328b9
changeset: 16459:554774a328b9
user: Timo Sirainen <tss at iki.fi>
date: Thu Jun 06 05:58:16 2013 +0300
description:
lib-http: Fixed previous patch setting connection connected only after SSL handshake.
This just caused crashes. The main point was anyway to include the SSL
handshake as part of the connect_timeout_msecs. Apparently the easiest way
is to set it immediately connected and delay removing the timeout.
diffstat:
src/lib-http/http-client-connection.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 12a0c383703e -r 554774a328b9 src/lib-http/http-client-connection.c
--- a/src/lib-http/http-client-connection.c Wed Jun 05 18:21:55 2013 +0300
+++ b/src/lib-http/http-client-connection.c Thu Jun 06 05:58:16 2013 +0300
@@ -671,7 +671,10 @@
conn->connected = TRUE;
conn->peer->last_connect_failed = FALSE;
- if (conn->to_connect != NULL)
+
+ if (conn->to_connect != NULL &&
+ (conn->ssl_iostream == NULL ||
+ ssl_iostream_is_handshaked(conn->ssl_iostream)))
timeout_remove(&conn->to_connect);
if (conn->client->set.rawlog_dir != NULL &&
@@ -703,7 +706,8 @@
*error_r = error;
return -1;
}
- http_client_connection_ready(conn);
+ if (conn->to_connect != NULL)
+ timeout_remove(&conn->to_connect);
return 0;
}
@@ -742,6 +746,8 @@
conn->conn.name, ssl_iostream_get_last_error(conn->ssl_iostream));
return -1;
}
+
+ http_client_connection_ready(conn);
return 0;
}
More information about the dovecot-cvs
mailing list