mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
Merge pull request #875 from simplement-e/master
Changed the service startup process not to wait for init
This commit is contained in:
commit
bcaadd59be
1 changed files with 12 additions and 12 deletions
|
@ -226,14 +226,9 @@ namespace MediaBrowser.ServerApplication
|
||||||
ErrorModes.SEM_NOGPFAULTERRORBOX | ErrorModes.SEM_NOOPENFILEERRORBOX);
|
ErrorModes.SEM_NOGPFAULTERRORBOX | ErrorModes.SEM_NOOPENFILEERRORBOX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var task = _appHost.Init(initProgress);
|
var task = _appHost.Init(initProgress);
|
||||||
Task.WaitAll(task);
|
task = task.ContinueWith(new Action<Task>(a => _appHost.RunStartupTasks()));
|
||||||
|
|
||||||
task = _appHost.RunStartupTasks();
|
|
||||||
Task.WaitAll(task);
|
|
||||||
|
|
||||||
SystemEvents.SessionEnding += SystemEvents_SessionEnding;
|
|
||||||
SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
|
|
||||||
|
|
||||||
if (runService)
|
if (runService)
|
||||||
{
|
{
|
||||||
|
@ -241,6 +236,11 @@ namespace MediaBrowser.ServerApplication
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Task.WaitAll(task);
|
||||||
|
|
||||||
|
SystemEvents.SessionEnding += SystemEvents_SessionEnding;
|
||||||
|
SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
|
||||||
|
|
||||||
HideSplashScreen();
|
HideSplashScreen();
|
||||||
|
|
||||||
ShowTrayIcon();
|
ShowTrayIcon();
|
||||||
|
|
Loading…
Reference in a new issue