This commit is contained in:
hap2712 2022-11-01 05:21:16 +09:00 committed by GitHub
commit 50d7952cb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -329,6 +329,15 @@ int on_frame_recv_callback(nghttp2_session *session, const nghttp2_frame *frame,
break;
}
case NGHTTP2_GOAWAY: {
if (!sess->stopped()) {
auto& cb = sess->on_error();
auto ec = make_error_code(
static_cast<nghttp2_error>(NGHTTP2_ERR_START_STREAM_NOT_ALLOWED));
cb(ec);
}
break;
}
}
return 0;
}