Skip to content

Http2SecureServer.close fails #19711

Description

@aabfred
  • Version: v9.10.1
  • Platform: Linux Host-001 4.14.6-300.fc27.x86_64 deps: update openssl to 1.0.1j #1 SMP Thu Dec 14 15:31:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: http2

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.good first issueIssues that are suitable for first-time contributors.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions