File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -2195,6 +2195,16 @@ int Http2Stream::SubmitPriority(const Http2Priority& priority,
21952195void Http2Stream::SubmitRstStream (const uint32_t code) {
21962196 CHECK (!this ->is_destroyed ());
21972197 code_ = code;
2198+
2199+ // If RST_STREAM is submitted with the cancel code, don't force purge the
2200+ // currently sending data. Instead add it to the pending stream list to
2201+ // avoid prioritizing over other operations.
2202+ // Ref:https://github.com/nodejs/node/issues/38964
2203+ if (code_ == NGHTTP2_CANCEL) {
2204+ session_->AddPendingRstStream (id_);
2205+ return ;
2206+ }
2207+
21982208 // If possible, force a purge of any currently pending data here to make sure
21992209 // it is sent before closing the stream. If it returns non-zero then we need
22002210 // to wait until the current write finishes and try again to avoid nghttp2
You can’t perform that action at this time.
0 commit comments