Skip to content

Commit

Permalink
SEBWIN-882, SEBWIN-904, #914: Ensured monitoring is terminated before…
Browse files Browse the repository at this point in the history
… reconfiguration.
  • Loading branch information
dbuechel committed Jul 29, 2024
1 parent 0b1746a commit a1bfaad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion SafeExamBrowser.Client/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class App : Application
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()
Expand Down
12 changes: 6 additions & 6 deletions SafeExamBrowser.Client/ClientController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ internal void Terminate()
CloseShell();
DeregisterEvents();
UpdateSessionIntegrity();
TerminateIntegrityVerification();

var success = operations.TryRevert() == OperationResult.Success;

Expand Down Expand Up @@ -335,6 +334,7 @@ private void AutoStartApplications()
private void PrepareShutdown()
{
FinalizeProctoring();
StopMonitoring();
}

private void FinalizeProctoring()
Expand Down Expand Up @@ -388,6 +388,11 @@ private void StartMonitoring()
}
}

private void StopMonitoring()
{
sentinel.StopMonitoring();
}

private void VerifyApplicationIntegrity()
{
logger.Info($"Attempting to verify application integrity...");
Expand Down Expand Up @@ -451,11 +456,6 @@ private void UpdateSessionIntegrity()
}
}

private void TerminateIntegrityVerification()
{
sentinel.StopMonitoring();
}

private void ApplicationMonitor_ExplorerStarted()
{
logger.Info("Trying to terminate Windows explorer...");
Expand Down

0 comments on commit a1bfaad

Please sign in to comment.