Skip to content

http2: emit close event if request aborted

Fix Http2ServerRequest and Http2ServerResponse to emit close event if the request is aborted before response.end() can be called. The test is adapted from an equivalent test in http1 so this behaviour matches http1. This fully fixes https://github.com/nodejs/node/issues/15385

Wasn't sure if we needed to check more than this.writable within onStreamAbortedResponse — welcome any other input on that (and the rest). Thanks!

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

http2, test

Merge request reports

Loading