Skip to content

Commit

Permalink
[api] Emit end event when done proxying
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Apr 16, 2011
1 parent a3cb527 commit 5681fc1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/node-http-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ HttpProxy.prototype.proxyRequest = function (req, res, port, host, buffer) {
if (!errState) {
reverseProxy.removeListener('error', proxyError);
res.end();

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

0 comments on commit 5681fc1

Please sign in to comment.