Merge pull request #1104 from nghttp2/allow-ping-after-goaway

Allow PING frame to be sent after GOAWAY
This commit is contained in:
Tatsuhiro Tsujikawa 2018-01-08 17:26:47 +09:00 committed by GitHub
commit 652f57e79d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -2225,8 +2225,9 @@ static int session_prep_frame(nghttp2_session *session,
assert(session->obq_flood_counter_ > 0);
--session->obq_flood_counter_;
}
if (session_is_closing(session)) {
/* PING frame is allowed to be sent unless termination GOAWAY is
sent */
if (session->goaway_flags & NGHTTP2_GOAWAY_TERM_ON_SEND) {
return NGHTTP2_ERR_SESSION_CLOSING;
}
nghttp2_frame_pack_ping(&session->aob.framebufs, &frame->ping);