SEBWIN-539: Fixed bug where a missing service component would lead to termination of SEB during reconfiguration. This due to the fact that the connection lost event of the service was erroneously still registered for the reconfiguration procedure.
This commit is contained in:
		
							parent
							
								
									87728f8301
								
							
						
					
					
						commit
						43f468dc68
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		|  | @ -228,6 +228,8 @@ namespace SafeExamBrowser.Runtime | ||||||
| 		{ | 		{ | ||||||
| 			if (SessionIsRunning) | 			if (SessionIsRunning) | ||||||
| 			{ | 			{ | ||||||
|  | 				RegisterSessionEvents(); | ||||||
|  | 
 | ||||||
| 				runtimeWindow.ShowProgressBar = false; | 				runtimeWindow.ShowProgressBar = false; | ||||||
| 				runtimeWindow.UpdateStatus(TextKey.RuntimeWindow_ApplicationRunning); | 				runtimeWindow.UpdateStatus(TextKey.RuntimeWindow_ApplicationRunning); | ||||||
| 				runtimeWindow.TopMost = Session.Settings.Security.KioskMode != KioskMode.None; | 				runtimeWindow.TopMost = Session.Settings.Security.KioskMode != KioskMode.None; | ||||||
|  | @ -267,7 +269,6 @@ namespace SafeExamBrowser.Runtime | ||||||
| 			runtimeHost.ClientConfigurationNeeded += RuntimeHost_ClientConfigurationNeeded; | 			runtimeHost.ClientConfigurationNeeded += RuntimeHost_ClientConfigurationNeeded; | ||||||
| 			runtimeHost.ReconfigurationRequested += RuntimeHost_ReconfigurationRequested; | 			runtimeHost.ReconfigurationRequested += RuntimeHost_ReconfigurationRequested; | ||||||
| 			runtimeHost.ShutdownRequested += RuntimeHost_ShutdownRequested; | 			runtimeHost.ShutdownRequested += RuntimeHost_ShutdownRequested; | ||||||
| 			service.ConnectionLost += ServiceProxy_ConnectionLost; |  | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		private void DeregisterEvents() | 		private void DeregisterEvents() | ||||||
|  | @ -275,17 +276,19 @@ namespace SafeExamBrowser.Runtime | ||||||
| 			runtimeHost.ClientConfigurationNeeded -= RuntimeHost_ClientConfigurationNeeded; | 			runtimeHost.ClientConfigurationNeeded -= RuntimeHost_ClientConfigurationNeeded; | ||||||
| 			runtimeHost.ReconfigurationRequested -= RuntimeHost_ReconfigurationRequested; | 			runtimeHost.ReconfigurationRequested -= RuntimeHost_ReconfigurationRequested; | ||||||
| 			runtimeHost.ShutdownRequested -= RuntimeHost_ShutdownRequested; | 			runtimeHost.ShutdownRequested -= RuntimeHost_ShutdownRequested; | ||||||
| 			service.ConnectionLost -= ServiceProxy_ConnectionLost; |  | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		private void RegisterSessionEvents() | 		private void RegisterSessionEvents() | ||||||
| 		{ | 		{ | ||||||
|  | 			service.ConnectionLost += ServiceProxy_ConnectionLost; | ||||||
| 			sessionContext.ClientProcess.Terminated += ClientProcess_Terminated; | 			sessionContext.ClientProcess.Terminated += ClientProcess_Terminated; | ||||||
| 			sessionContext.ClientProxy.ConnectionLost += ClientProxy_ConnectionLost; | 			sessionContext.ClientProxy.ConnectionLost += ClientProxy_ConnectionLost; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		private void DeregisterSessionEvents() | 		private void DeregisterSessionEvents() | ||||||
| 		{ | 		{ | ||||||
|  | 			service.ConnectionLost -= ServiceProxy_ConnectionLost; | ||||||
|  | 
 | ||||||
| 			if (sessionContext.ClientProcess != null) | 			if (sessionContext.ClientProcess != null) | ||||||
| 			{ | 			{ | ||||||
| 				sessionContext.ClientProcess.Terminated -= ClientProcess_Terminated; | 				sessionContext.ClientProcess.Terminated -= ClientProcess_Terminated; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Damian Büchel
						Damian Büchel