]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: client: Recreate connection IO after streams change.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 9 Feb 2018 22:56:55 +0000 (23:56 +0100)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 12 Mar 2018 07:24:15 +0000 (09:24 +0200)
src/lib-http/http-client-connection.c

index bd30926a6e5b46ad71f39ba82933a7df259e3d4f..4b5ba96fd197376ca3ea730444d985d3a6f2cfc8 100644 (file)
@@ -1377,6 +1377,7 @@ http_client_connection_ssl_init(struct http_client_connection *conn,
 
        e_debug(conn->event, "Starting SSL handshake");
 
+       connection_input_halt(&conn->conn);
        if (io_stream_create_ssl_client(ssl_ctx,
                                        pshared->addr.a.tcp.https_name, &ssl_set,
                                        &conn->conn.input, &conn->conn.output,
@@ -1386,6 +1387,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) {