diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2019-07-22 09:42:28 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2019-07-22 09:42:28 -0400 |
| commit | c4d294b297286d79626a5a18e0800180722478dc (patch) | |
| tree | f16c71b224d523a834c5f5942b73e3fd484f00a8 /www/js | |
| parent | 948974395cc4559cff94802fd9d3ff63a5006819 (diff) | |
don't do reachability if we don't have fallbacks
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/NVR.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/www/js/NVR.js b/www/js/NVR.js index 8bd6e283..947d0bbc 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -1746,11 +1746,21 @@ angular.module('zmApp.controllers') log("reached end of chain loop"); } } else { - log("detected loop when " + tLd.serverName + " fallsback to " + tLd.fallbackConfiguration); + if (tLd.fallbackConfiguration) { + log("detected loop when " + tLd.serverName + " fallsback to " + tLd.fallbackConfiguration); + } + keepBuilding = false; } } + + if (chainURLs.length == 1) { + log ('No need to do a reachability test, as there are no fallbacks'); + d.resolve("done"); + return d.promise; + } + console.log ('chainURLS:'+ chainURLs.length); //contactedServers.push(loginData.serverName); findFirstReachableUrl(chainURLs).then(function (firstReachableUrl) { d.resolve(firstReachableUrl); |
