Skip to content

Commit

Permalink
Future-proof hapi for node v16, rely on res close rather than req (#4225
Browse files Browse the repository at this point in the history
)
  • Loading branch information
devinivy committed Mar 20, 2021
1 parent 19f27f5 commit 4639686
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ exports = module.exports = internals.Request = class {
this.raw.req.on('end', internals.event.bind(this.raw.req, this._eventContext, 'end'));
}

this.raw.req.on('close', internals.event.bind(this.raw.req, this._eventContext, 'close'));
this.raw.res.on('close', internals.event.bind(this.raw.res, this._eventContext, 'close'));
this.raw.req.on('error', internals.event.bind(this.raw.req, this._eventContext, 'error'));
this.raw.req.on('aborted', internals.event.bind(this.raw.req, this._eventContext, 'abort'));
this.raw.res.once('close', internals.closed.bind(this.raw.res, this));
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@hapi/hoek": "9.x.x",
"@hapi/mimos": "5.x.x",
"@hapi/podium": "^4.1.1",
"@hapi/shot": "^5.0.1",
"@hapi/shot": "^5.0.5",
"@hapi/somever": "3.x.x",
"@hapi/statehood": "^7.0.3",
"@hapi/subtext": "^7.0.3",
Expand All @@ -42,8 +42,8 @@
"@hapi/inert": "^6.0.2",
"@hapi/joi-legacy-test": "npm:@hapi/joi@15.x.x",
"@hapi/lab": "24.x.x",
"@hapi/wreck": "17.x.x",
"@hapi/vision": "^6.0.1",
"@hapi/wreck": "17.x.x",
"handlebars": "^4.5.3",
"joi": "17.x.x"
},
Expand Down

0 comments on commit 4639686

Please sign in to comment.