-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
Http2SecureServer.close fails #19711
Copy link
Copy link
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem:
Closing an Http2Server runs only when it has no connection;
Otherwise, no "close" or "error" event is emitted after close(), and script doesn't exit (server still listening)
bug.js:
const
http2 = require( "http2" ),
srv = http2.createServer();
srv.listen(9000);
const client = http2.connect("http://localhost:9000");
setTimeout(() => { srv.close() }, 500);
$ export NODE_DEBUG=http2; node ./bug.js
HTTP2 30406: Http2Session client: created
(node:30406) ExperimentalWarning: The http2 module is an experimental API.
HTTP2 30406: Http2Session server: received a connection
HTTP2 30406: Http2Session server: setting up session handle
HTTP2 30406: Http2Session server: sending settings
HTTP2 30406: Http2Session server: submitting settings
HTTP2 30406: Http2Session server: created
HTTP2 30406: Http2Session client: setting up session handle
HTTP2 30406: Http2Session client: sending settings
HTTP2 30406: Http2Session client: submitting settings
HTTP2 30406: Http2Session client: new settings received
HTTP2 30406: Http2Session server: new settings received
HTTP2 30406: Http2Session server: settings received
HTTP2 30406: Http2Session client: settings received