mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
#51 - Restart the server took long time, and dashboard will die
This commit is contained in:
parent
3303f30f8a
commit
3dc9cacfad
@ -134,6 +134,11 @@ namespace MediaBrowser.ServerApplication
|
|||||||
Logger.ErrorException("UnhandledException", exception);
|
Logger.ErrorException("UnhandledException", exception);
|
||||||
|
|
||||||
MessageBox.Show("Unhandled exception: " + exception.Message);
|
MessageBox.Show("Unhandled exception: " + exception.Message);
|
||||||
|
|
||||||
|
if (!Debugger.IsAttached)
|
||||||
|
{
|
||||||
|
Environment.Exit(System.Runtime.InteropServices.Marshal.GetHRForException(exception));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -382,7 +382,7 @@ var Dashboard = {
|
|||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
Dashboard.reloadPageWhenServerAvailable();
|
Dashboard.reloadPageWhenServerAvailable();
|
||||||
}, 500);
|
}, 250);
|
||||||
|
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
Dashboard.suppressAjaxErrors = false;
|
Dashboard.suppressAjaxErrors = false;
|
||||||
@ -391,10 +391,17 @@ var Dashboard = {
|
|||||||
|
|
||||||
reloadPageWhenServerAvailable: function (retryCount) {
|
reloadPageWhenServerAvailable: function (retryCount) {
|
||||||
|
|
||||||
ApiClient.getSystemInfo().done(function () {
|
ApiClient.getSystemInfo().done(function (info) {
|
||||||
Dashboard.reloadPage();
|
|
||||||
|
// If this is back to false, the restart completed
|
||||||
|
if (!info.HasPendingRestart) {
|
||||||
|
Dashboard.reloadPage();
|
||||||
|
} else {
|
||||||
|
Dashboard.reloadPageWhenServerAvailable(retryCount);
|
||||||
|
}
|
||||||
|
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
|
||||||
retryCount = retryCount || 0;
|
retryCount = retryCount || 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user