Closed
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