[api] Emit end event when done proxying

This commit is contained in:
indexzero 2011-04-15 21:09:54 -04:00
parent a3cb527be5
commit 5681fc1a28

View File

@ -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);
}
});
});