changeset 16450:20b065a5299d

lib-http: Mark the HTTP connection connected only after SSL handshake is finished.
author Timo Sirainen <tss@iki.fi>
date Wed, 05 Jun 2013 15:43:42 +0300
parents 686d2dc1d8dd
children a551409911f9
files src/lib-http/http-client-connection.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-http/http-client-connection.c	Wed Jun 05 15:08:59 2013 +0300
+++ b/src/lib-http/http-client-connection.c	Wed Jun 05 15:43:42 2013 +0300
@@ -665,6 +665,7 @@
 		*error_r = error;
 		return -1;
 	}
+	http_client_connection_ready(conn);
 	return 0;
 }
 
@@ -703,8 +704,6 @@
 			conn->conn.name, ssl_iostream_get_last_error(conn->ssl_iostream));
 		return -1;
 	}
-
-	http_client_connection_ready(conn);
 	return 0;
 }