Skip to content

Commit 7f3dfd0

Browse files
committed
docs: removed XXX and added NOTE
1 parent a13201b commit 7f3dfd0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,8 @@ function proxy (req, resOrSocket, options, onRes, onError) {
177177
callback(err)
178178
}
179179
})
180-
// XXX http.ClientRequest doesn't emit 'aborted'. Instead it emits
181-
// a "socket hang up" error.
182-
// .on('aborted', () => callback(new createError.BadGateway('socket hang up')))
183-
// (https://github.com/nodejs/node/pull/15270)
180+
// NOTE http.ClientRequest emits "socket hang up" error when aborted, i.e.
181+
// there is no need to listen for proxyReq.on('aborted', ...).
184182
.on('timeout', () => callback(createError('gateway timeout', null, 504)))
185183
.on('response', proxyRes => {
186184
try {

0 commit comments

Comments
 (0)