]> 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)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 16 Feb 2018 12:54:56 +0000 (13:54 +0100)
src/lib-http/http-client-connection.c

index 9c1cf0efb97e346e9df6600417b4671e0eb58f7c..89458b9a187286e2d7089b05f1a6e08e490b132c 100644 (file)
@@ -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,
@@ -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) {