]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Do not call nghttp2_session_terminate_session() in server-side code
authorArtem Boldariev <artem@boldariev.com>
Wed, 12 May 2021 08:48:13 +0000 (11:48 +0300)
committerArtem Boldariev <artem@boldariev.com>
Thu, 13 May 2021 07:42:25 +0000 (10:42 +0300)
We should not call nghttp2_session_terminate_session() in server-side
code after all of the active HTTP/2 streams are processed. The
underlying transport connection is expected to remain opened at least
for some time in this case for new HTTP/2 requests to arrive. That is
what flamethrower was expecting and it makes perfect sense from the
HTTP/2 perspective.

lib/isc/netmgr/http.c

index b76c0b263ba612e3ca81209ebe2c3dc977661ebc..8ac2dd5ed8df2d04c1a1cef57d64a9e1df418f44 100644 (file)
@@ -562,10 +562,6 @@ on_server_stream_close_callback(int32_t stream_id,
        int rv = 0;
 
        ISC_LIST_UNLINK(session->sstreams, &sock->h2, link);
-       if (ISC_LIST_EMPTY(session->sstreams)) {
-               rv = nghttp2_session_terminate_session(session->ngsession,
-                                                      NGHTTP2_NO_ERROR);
-       }
        session->nsstreams--;
        isc__nmsocket_detach(&sock);
        return (rv);