mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
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.
This commit is contained in:
parent
7773d07571
commit
5d1063e935
@ -107,8 +107,12 @@ function loadContent(event, forceRefresh)
|
||||
var tag;
|
||||
|
||||
var lastSelectedInstance = getStorage('lastSelectedInstance', false);
|
||||
if(lastSelectedInstance && (lastSelectedInstance != window.currentHyperionInstance))
|
||||
instanceSwitch(lastSelectedInstance);
|
||||
|
||||
if (lastSelectedInstance && (lastSelectedInstance != window.currentHyperionInstance))
|
||||
if (typeof(window.serverInfo.instance[lastSelectedInstance].running) !== 'undefined' && window.serverInfo.instance[lastSelectedInstance].running)
|
||||
instanceSwitch(lastSelectedInstance);
|
||||
else
|
||||
removeStorage('lastSelectedInstance', false);
|
||||
|
||||
if(typeof event != "undefined")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user