Skip to content

Commit

Permalink
lib-http: client: Recreate connection IO after streams change.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch authored and villesavolainen committed Feb 22, 2018
1 parent 912c247 commit 0a6d19a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib-http/http-client-connection.c
Expand Up @@ -1243,6 +1243,7 @@ http_client_connection_ssl_init(struct http_client_connection *conn,
if (conn->client->set.debug)
http_client_connection_debug(conn, "Starting SSL handshake");

connection_input_halt(&conn->conn);
if (io_stream_create_ssl_client(conn->client->ssl_ctx,
conn->peer->addr.a.tcp.https_name, &ssl_set,
&conn->conn.input, &conn->conn.output,
Expand All @@ -1252,6 +1253,7 @@ http_client_connection_ssl_init(struct http_client_connection *conn,
conn->conn.name, error);
return -1;
}
connection_input_resume(&conn->conn);
ssl_iostream_set_handshake_callback(conn->ssl_iostream,
http_client_connection_ssl_handshaked, conn);
if (ssl_iostream_handshake(conn->ssl_iostream) < 0) {
Expand Down

0 comments on commit 0a6d19a

Please sign in to comment.