Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2017-11-04 20:42:07 +0300
committerMyles Borins <mylesborins@google.com>2017-12-08 16:54:43 +0300
commitd7f37cebed8a42dca6a772d8ea84d182676e2eef (patch)
treeb886f3b0b9147dcbcf0f48c6d449a0e29109beb8 /lib
parent22ee96077530fc84337a6d1af76a1efc208c0549 (diff)
http2: simplify subsequent rstStream calls
Do not call destroy each time rstStream is called since the first call (or receipt of rst frame) will always trigger destroy. Expand existing test for this behaviour. PR-URL: https://github.com/nodejs/node/pull/16753 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/http2/core.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js
index a6dbd626ec8..19790ad4e6f 100644
--- a/lib/internal/http2/core.js
+++ b/lib/internal/http2/core.js
@@ -970,9 +970,8 @@ class Http2Session extends EventEmitter {
const state = stream[kState];
if (state.rst) {
- // rst has already been called, do not call again,
- // skip straight to destroy
- stream.destroy();
+ // rst has already been called by self or peer,
+ // do not call again
return;
}
state.rst = true;