Skip to content

Commit 5d1063e

Browse files
authored
Check if requested Instance is running (#759)
Preventing a dead lock when the requested instance from local store is not running. If it is not running we will now delete the lastSelectedInstance and switch back to index 0.
1 parent 7773d07 commit 5d1063e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

assets/webconfig/js/ui_utils.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,12 @@ function loadContent(event, forceRefresh)
107107
var tag;
108108

109109
var lastSelectedInstance = getStorage('lastSelectedInstance', false);
110-
if(lastSelectedInstance && (lastSelectedInstance != window.currentHyperionInstance))
111-
instanceSwitch(lastSelectedInstance);
110+
111+
if (lastSelectedInstance && (lastSelectedInstance != window.currentHyperionInstance))
112+
if (typeof(window.serverInfo.instance[lastSelectedInstance].running) !== 'undefined' && window.serverInfo.instance[lastSelectedInstance].running)
113+
instanceSwitch(lastSelectedInstance);
114+
else
115+
removeStorage('lastSelectedInstance', false);
112116

113117
if(typeof event != "undefined")
114118
{

0 commit comments

Comments
 (0)