Commit 8667bbb8 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Don't send WINDOW_UPDATE if session is being closed

parent 1fef49aa
......@@ -1642,6 +1642,11 @@ static int session_predicate_push_promise_send(nghttp2_session *session,
static int session_predicate_window_update_send(nghttp2_session *session,
int32_t stream_id) {
nghttp2_stream *stream;
if (session_is_closing(session)) {
return NGHTTP2_ERR_SESSION_CLOSING;
}
if (stream_id == 0) {
/* Connection-level window update */
return 0;
......@@ -1650,9 +1655,6 @@ static int session_predicate_window_update_send(nghttp2_session *session,
if (stream == NULL) {
return NGHTTP2_ERR_STREAM_CLOSED;
}
if (session_is_closing(session)) {
return NGHTTP2_ERR_SESSION_CLOSING;
}
if (stream->state == NGHTTP2_STREAM_CLOSING) {
return NGHTTP2_ERR_STREAM_CLOSING;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment