-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
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.http2Issues or PRs related to the http2 subsystem.Issues or PRs related to the http2 subsystem.
Description
In the http2
module, the Http2Session
class emits an event named close
, which is documented at https://github.com/nodejs/node/blob/master/doc/api/http2.md#event-close.
As evident from the following function from lib/internal/http2/core.js
, the event does not expect any arguments:
function emitClose(self, error) {
if (error)
self.emit('error', error);
self.emit('close');
}
However, the current docs do a poor job of communicating this, therefore creating confusion.
Thus, the fact that the close
event does not expect arguments should be explicitly mentioned in the docs.
The exact source can be found at:
Lines 126 to 131 in 6376d43
#### Event: 'close' | |
<!-- YAML | |
added: v8.4.0 | |
--> | |
The `'close'` event is emitted once the `Http2Session` has been destroyed. |
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.http2Issues or PRs related to the http2 subsystem.Issues or PRs related to the http2 subsystem.