From e5c94df934f2b2b329bf66bae48a4f5b6a87d2be Mon Sep 17 00:00:00 2001 From: Jean-Charles Sisk Date: Tue, 17 Jul 2018 16:56:55 -0400 Subject: [PATCH] perf: change while/shift to for loop --- lib/proxy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/proxy.js b/lib/proxy.js index 776bab5..6ac2b5d 100755 --- a/lib/proxy.js +++ b/lib/proxy.js @@ -534,8 +534,8 @@ ReverseProxy.prototype.resolve = function (host, url, req) { } return Promise.all(promiseArray).then(function (resolverResults) { - while (resolverResults.length) { - var route = resolverResults.shift(); + for (var i=0; i