| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2497216 commit 086bb2f
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1115,17 +1115,6 @@ int Http2Session::OnStreamClose(nghttp2_session* handle, | |||
| 1115 | 1115 | if (!stream || stream->is_destroyed()) | |
| 1116 | 1116 | return 0; | |
| 1117 | 1117 | ||
| 1118 | - // Don't close synchronously in case there's pending data to be written. This | ||
| 1119 | - // may happen when writing trailing headers. | ||
| 1120 | - if (code == NGHTTP2_NO_ERROR && nghttp2_session_want_write(handle) && | ||
| 1121 | - !env->is_stopping()) { | ||
| 1122 | - env->SetImmediate([handle, id, code, user_data](Environment* env) { | ||
| 1123 | - OnStreamClose(handle, id, code, user_data); | ||
| 1124 | - }); | ||
| 1125 | - | ||
| 1126 | - return 0; | ||
| 1127 | - } | ||
| 1128 | - | ||
| 1129 | 1118 | stream->Close(code); | |
| 1130 | 1119 | ||
| 1131 | 1120 | // It is possible for the stream close to occur before the stream is | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,13 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 3 | + // Fixes: https://github.com/nodejs/node/issues/42713 | ||
| 3 | 4 | const common = require('../common'); | |
| 4 | - if (!common.hasCrypto) | ||
| 5 | + if (!common.hasCrypto) { | ||
| 6 | + // Remove require('assert').fail when issue is fixed and test | ||
| 7 | + // is moved out of the known_issues directory. | ||
| 8 | + require('assert').fail('missing crypto'); | ||
| 5 | 9 | common.skip('missing crypto'); | |
| 10 | + } | ||
| 6 | 11 | const assert = require('assert'); | |
| 7 | 12 | const http2 = require('http2'); | |
| 8 | 13 | ||
@@ -31,7 +36,7 @@ server.listen(0, common.mustCall(() => { | |||
| 31 | 36 | client.socket.on('close', common.mustCall()); | |
| 32 | 37 | const req = client.request({ | |
| 33 | 38 | [HTTP2_HEADER_PATH]: '/', | |
| 34 | - [HTTP2_HEADER_METHOD]: 'POST' | ||
| 39 | + [HTTP2_HEADER_METHOD]: 'POST', | ||
| 35 | 40 | }); | |
| 36 | 41 | req.end(); | |
| 37 | 42 | req.on('response', common.mustCall()); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments