From 0047ae69f46ca7fbcfb244b34a970dd477da3765 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 16 May 2017 02:27:33 -0500 Subject: [PATCH] don't empty the real array, duh --- lib/modules/http.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/modules/http.js b/lib/modules/http.js index 11258f1..72092b3 100644 --- a/lib/modules/http.js +++ b/lib/modules/http.js @@ -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); }