| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 21e9888 commit 8245e5a
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -970,9 +970,8 @@ class Http2Session extends EventEmitter { | |||
| 970 | 970 | ||
| 971 | 971 | const state = stream[kState]; | |
| 972 | 972 | if (state.rst) { | |
| 973 | - // rst has already been called, do not call again, | ||
| 974 | - // skip straight to destroy | ||
| 975 | - stream.destroy(); | ||
| 973 | + // rst has already been called by self or peer, | ||
| 974 | + // do not call again | ||
| 976 | 975 | return; | |
| 977 | 976 | } | |
| 978 | 977 | state.rst = true; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,6 +21,10 @@ server.on('listening', common.mustCall(() => { | |||
| 21 | 21 | // make sure that destroy is called | |
| 22 | 22 | req._destroy = common.mustCall(req._destroy.bind(req)); | |
| 23 | 23 | ||
| 24 | + // second call doesn't do anything | ||
| 25 | + assert.doesNotThrow(() => client.rstStream(req, 8)); | ||
| 26 | + assert.strictEqual(req.rstCode, 0); | ||
| 27 | + | ||
| 24 | 28 | req.on('streamClosed', common.mustCall((code) => { | |
| 25 | 29 | assert.strictEqual(req.destroyed, true); | |
| 26 | 30 | assert.strictEqual(code, 0); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments