Skip to content

Commit eaa9b7a

Browse files
http2: address review feedback
1 parent b392d07 commit eaa9b7a

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

‎src/node_http2.cc‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,10 +1067,7 @@ int Http2Session::OnBeginHeadersCallback(nghttp2_session* handle,
10671067
// whose JS wrapper (and onread) is never installed.
10681068
if (session->is_closing()) {
10691069
nghttp2_submit_rst_stream(
1070-
session->session(),
1071-
NGHTTP2_FLAG_NONE,
1072-
id,
1073-
NGHTTP2_CANCEL);
1070+
session->session(), NGHTTP2_FLAG_NONE, id, NGHTTP2_REFUSED_STREAM);
10741071
return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
10751072
}
10761073
if (!session->CanAddStream() ||
@@ -1536,16 +1533,6 @@ void Http2StreamListener::OnStreamRead(ssize_t nread, const uv_buf_t& buf) {
15361533
return;
15371534
}
15381535

1539-
// Streams created after a deferred session close may never get a JS
1540-
// wrapper (handle.onread is only set in Http2Stream[kInit]). Drop the
1541-
// chunk instead of asserting in CallJSOnreadMethod.
1542-
Local<Value> onread =
1543-
stream->object()
1544-
->GetInternalField(StreamBase::kOnReadFunctionField)
1545-
.As<Value>();
1546-
if (!onread->IsFunction())
1547-
return;
1548-
15491536
Local<ArrayBuffer> ab;
15501537
if (session->stream_buf_ab_.IsEmpty()) {
15511538
ab = ArrayBuffer::New(env->isolate(),

0 commit comments

Comments
 (0)