Do not call nghttp2_session_terminate_session() in server-side code
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user