Commit 182dcd34 authored by Dominic Tarr's avatar Dominic Tarr

always emit end in 0.4

parent 7feee194
......@@ -266,7 +266,12 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
// already been called and the 'error' event listener
// removed.
//
var ended = false
response.on('close', function () {
if(!ended) response.emit('end')
})
response.on('end', function () {
ended = true
if (!errState) {
reverseProxy.removeListener('error', proxyError);
......
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