Skip to content

Commit

Permalink
lib-http: server: 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 0a6d19a commit 866f79e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib-http/http-server-connection.c
Expand Up @@ -397,13 +397,16 @@ http_server_connection_ssl_init(struct http_server_connection *conn)
if (conn->server->set.debug)
http_server_connection_debug(conn, "Starting SSL handshake");

http_server_connection_input_halt(conn);
if (master_service_ssl_init(master_service,
&conn->conn.input, &conn->conn.output,
&conn->ssl_iostream, &error) < 0) {
http_server_connection_error(conn,
"Couldn't initialize SSL server for %s: %s", conn->conn.name, error);
return -1;
}
http_server_connection_input_resume(conn);

if (ssl_iostream_handshake(conn->ssl_iostream) < 0) {
http_server_connection_error(conn,"SSL handshake failed: %s",
ssl_iostream_get_last_error(conn->ssl_iostream));
Expand Down

0 comments on commit 866f79e

Please sign in to comment.