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.
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);