]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: server: Fixed handling of disconnection while request is being handled.
authorStephan Bosch <stephan@rename-it.nl>
Wed, 10 Sep 2014 10:39:36 +0000 (13:39 +0300)
committerStephan Bosch <stephan@rename-it.nl>
Wed, 10 Sep 2014 10:39:36 +0000 (13:39 +0300)
This would cause an assert failure.

src/lib-http/http-server-connection.c

index 9e6d824ef5fc7aa6d2739c5afa63ae95bce3cd78..fcce9d5a682810d3763bd3283c22f51e2d99fa2c 100644 (file)
@@ -303,8 +303,8 @@ http_server_connection_handle_request(struct http_server_connection *conn,
        http_server_connection_ref(conn);
        http_server_connection_request_callback(conn, req);
        http_server_connection_unref(&conn);
-       if (conn == NULL) {
-               /* the callback managed to get this connection destroyed */
+       if (conn == NULL || conn->closed) {
+               /* the callback managed to get this connection destroyed/closed */
                return FALSE;
        }