We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcf422e commit cee78bfCopy full SHA for cee78bf
src/node_http2.cc
@@ -881,7 +881,12 @@ int Http2Session::OnHeaderCallback(nghttp2_session* handle,
881
Http2Session* session = static_cast<Http2Session*>(user_data);
882
int32_t id = GetFrameID(frame);
883
Http2Stream* stream = session->FindStream(id);
884
- CHECK_NOT_NULL(stream);
+ // If stream is null at this point, either something odd has happened
885
+ // or the stream was closed locally while header processing was occurring.
886
+ // either way, do not proceed and close the stream.
887
+ if (stream == nullptr)
888
+ return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
889
+
890
// If the stream has already been destroyed, ignore.
891
if (!stream->IsDestroyed() && !stream->AddHeader(name, value, flags)) {
892
// This will only happen if the connected peer sends us more
0 commit comments