SEBWIN-444: Changed server operation implementation to not re-initialize connection during reconfiguration.

This commit is contained in:
Damian Büchel 2020-12-01 18:25:53 +01:00
parent 15be4cbaf7
commit 786193aff4

View file

@ -133,14 +133,18 @@ namespace SafeExamBrowser.Runtime.Operations
public override OperationResult Repeat() public override OperationResult Repeat()
{ {
var result = Revert(); if (Context.Current.Settings.SessionMode == SessionMode.Server)
if (result == OperationResult.Success)
{ {
result = Perform(); Context.Next.AppConfig.ServerApi = Context.Current.AppConfig.ServerApi;
Context.Next.AppConfig.ServerConnectionToken = Context.Current.AppConfig.ServerConnectionToken;
Context.Next.AppConfig.ServerExamId = Context.Current.AppConfig.ServerExamId;
Context.Next.AppConfig.ServerOauth2Token = Context.Current.AppConfig.ServerOauth2Token;
Context.Next.Settings.Server = Context.Current.Settings.Server;
Context.Next.Settings.SessionMode = SessionMode.Server;
} }
return result; return OperationResult.Success;
} }
public override OperationResult Revert() public override OperationResult Revert()