Skip to content

Commit

Permalink
[api] Always emit end event
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Sep 25, 2012
1 parent c639ca8 commit e477cb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/http-proxy/http-proxy.js
Expand Up @@ -276,10 +276,10 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
response.on('end', function () {
if (!errState) {
reverseProxy.removeListener('error', proxyError);

// Emit the `end` event now that we have completed proxying
self.emit('end', req, res);
}

// Emit the `end` event now that we have completed proxying
self.emit('end', req, res);
});
});

Expand Down

0 comments on commit e477cb8

Please sign in to comment.