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,
2195
2195
void Http2Stream::SubmitRstStream (const uint32_t code) {
2196
2196
CHECK (!this ->is_destroyed ());
2197
2197
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
+
2198
2208
// If possible, force a purge of any currently pending data here to make sure
2199
2209
// it is sent before closing the stream. If it returns non-zero then we need
2200
2210
// 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