From 4041d1eb26b46c4bb59445367aa1df296f6ba0d6 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 15 Apr 2016 00:59:05 +0900 Subject: [PATCH] Don't send ALTSVC if stream is closing --- lib/nghttp2_session.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index d3fd37aa..2c927bb6 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -1706,6 +1706,9 @@ static int session_predicate_altsvc_send(nghttp2_session *session, if (stream == NULL) { return NGHTTP2_ERR_STREAM_CLOSED; } + if (stream->state == NGHTTP2_STREAM_CLOSING) { + return NGHTTP2_ERR_STREAM_CLOSING; + } return 0; }