mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05: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
					
				@ -224,23 +224,23 @@ namespace MediaBrowser.ServerApplication
 | 
				
			|||||||
                // Not crazy about this but it's the only way to suppress ffmpeg crash dialog boxes
 | 
					                // Not crazy about this but it's the only way to suppress ffmpeg crash dialog boxes
 | 
				
			||||||
                SetErrorMode(ErrorModes.SEM_FAILCRITICALERRORS | ErrorModes.SEM_NOALIGNMENTFAULTEXCEPT |
 | 
					                SetErrorMode(ErrorModes.SEM_FAILCRITICALERRORS | ErrorModes.SEM_NOALIGNMENTFAULTEXCEPT |
 | 
				
			||||||
                             ErrorModes.SEM_NOGPFAULTERRORBOX | ErrorModes.SEM_NOOPENFILEERRORBOX);
 | 
					                             ErrorModes.SEM_NOGPFAULTERRORBOX | ErrorModes.SEM_NOOPENFILEERRORBOX);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var task = _appHost.Init(initProgress);
 | 
					
 | 
				
			||||||
            Task.WaitAll(task);
 | 
					            var task = _appHost.Init(initProgress);
 | 
				
			||||||
 | 
					            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)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                StartService(logManager);
 | 
					                StartService(logManager);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
					                Task.WaitAll(task);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                SystemEvents.SessionEnding += SystemEvents_SessionEnding;
 | 
				
			||||||
 | 
					                SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
                HideSplashScreen();
 | 
					                HideSplashScreen();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                ShowTrayIcon();
 | 
					                ShowTrayIcon();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user