Commit 5681fc1a authored by indexzero's avatar indexzero

[api] Emit `end` event when done proxying

parent a3cb527b
......@@ -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);
}
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment