diff --git a/lib/request.js b/lib/request.js index deeb577d5..1cfc0b89d 100755 --- a/lib/request.js +++ b/lib/request.js @@ -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)); diff --git a/package.json b/package.json index b9d53ed9d..c0a4988c3 100755 --- a/package.json +++ b/package.json @@ -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", @@ -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" },