8000 [api] Always emit `end` event · unbug/node-http-proxy@196cc23 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 196cc23

Browse files
committed
[api] Always emit end event
1 parent 173a6ad commit 196cc23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/http-proxy/http-proxy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,10 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
301301
response.on('end', function () {
302302
if (!errState) {
303303
reverseProxy.removeListener('error', proxyError);
304-
305-
// Emit the `end` event now that we have completed proxying
306-
self.emit('end', req, res);
307304
}
305+
306+
// Emit the `end` event now that we have completed proxying
307+
self.emit('end', req, res);
308308
});
309309
});
310310

0 commit comments

Comments
 (0)
0