From acd6b40e4cd2efe1f197f6f7bea4663fb9a27372 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 8 Jan 2018 17:03:48 +0900 Subject: [PATCH] Allow PING frame to be sent after GOAWAY --- lib/nghttp2_session.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index b14ed77a..c4bbf274 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -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);