don't empty the real array, duh

This commit is contained in:
AJ ONeal 2017-05-16 02:27:33 -05:00
parent 3aa1085008
commit 0047ae69f4
1 changed files with 3 additions and 1 deletions

View File

@ -202,10 +202,12 @@ module.exports.create = function (deps, conf, greenlockMiddleware) {
socket.end();
}
var prs = proxyRoutes.slice();
function proxyWs() {
var proxyRoute = proxyRoutes.shift();
var proxyRoute = prs.shift();
if (!proxyRoute) {
socket.end();
return;
}
proxyRoute.ws(req, socket, head, proxyWs);
}