From: Stephan Bosch Date: Fri, 9 Feb 2018 22:57:29 +0000 (+0100) Subject: lib-http: server: Recreate connection IO after streams change. X-Git-Tag: 2.2.35~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0fc31c12a56bc7fd69d12d1868297ca4ab5c6d5;p=thirdparty%2Fdovecot%2Fcore.git lib-http: server: Recreate connection IO after streams change. --- diff --git a/src/lib-http/http-server-connection.c b/src/lib-http/http-server-connection.c index 2f355d35d9..c045d03709 100644 --- a/src/lib-http/http-server-connection.c +++ b/src/lib-http/http-server-connection.c @@ -397,6 +397,7 @@ 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) { @@ -404,6 +405,8 @@ http_server_connection_ssl_init(struct http_server_connection *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));