Skip to content

Commit

Permalink
use req.socket.on('close') instead of req.on('aborted')
Browse files Browse the repository at this point in the history
  • Loading branch information
flotwig committed Nov 8, 2021
1 parent 6f1dc36 commit e8bdd77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/proxy/lib/http/request-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const SendRequestOutgoing: RequestMiddleware = function () {

req.on('error', this.onError)
req.on('response', (incomingRes) => this.onResponse(incomingRes, req))
this.req.on('aborted', () => {
this.req.socket.on('close', () => {
this.debug('request aborted')
req.abort()
})
Expand Down

0 comments on commit e8bdd77

Please sign in to comment.