diff --git a/SafeExamBrowser.Client/App.cs b/SafeExamBrowser.Client/App.cs index cf549be0..170b71d1 100644 --- a/SafeExamBrowser.Client/App.cs +++ b/SafeExamBrowser.Client/App.cs @@ -20,7 +20,7 @@ namespace SafeExamBrowser.Client private const int ILMCM_LANGUAGEBAROFF = 0x00002; private static readonly Mutex Mutex = new Mutex(true, AppConfig.CLIENT_MUTEX_NAME); - private CompositionRoot instances = new CompositionRoot(); + private readonly CompositionRoot instances = new CompositionRoot(); [STAThread] public static void Main() diff --git a/SafeExamBrowser.Client/ClientController.cs b/SafeExamBrowser.Client/ClientController.cs index 07389e28..9a66be2d 100644 --- a/SafeExamBrowser.Client/ClientController.cs +++ b/SafeExamBrowser.Client/ClientController.cs @@ -180,7 +180,6 @@ namespace SafeExamBrowser.Client CloseShell(); DeregisterEvents(); UpdateSessionIntegrity(); - TerminateIntegrityVerification(); var success = operations.TryRevert() == OperationResult.Success; @@ -335,6 +334,7 @@ namespace SafeExamBrowser.Client private void PrepareShutdown() { FinalizeProctoring(); + StopMonitoring(); } private void FinalizeProctoring() @@ -388,6 +388,11 @@ namespace SafeExamBrowser.Client } } + private void StopMonitoring() + { + sentinel.StopMonitoring(); + } + private void VerifyApplicationIntegrity() { logger.Info($"Attempting to verify application integrity..."); @@ -451,11 +456,6 @@ namespace SafeExamBrowser.Client } } - private void TerminateIntegrityVerification() - { - sentinel.StopMonitoring(); - } - private void ApplicationMonitor_ExplorerStarted() { logger.Info("Trying to terminate Windows explorer...");