Skip to content

Commit bb002b5

Browse files
committed
prevent unnecessary req.abort()
1 parent 425b79a commit bb002b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/proxy/lib/http/request-middleware.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ const SendRequestOutgoing: RequestMiddleware = function () {
171171
req.on('error', this.onError)
172172
req.on('response', (incomingRes) => this.onResponse(incomingRes, req))
173173
this.req.socket.on('close', () => {
174+
if (!this.req.aborted) return
175+
174176
this.debug('request aborted')
175177
req.abort()
176178
})

0 commit comments

Comments
 (0)