From 87728f83018328923e7b7c2544720b4dfc62764b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Thu, 6 Jan 2022 14:35:34 +0100 Subject: [PATCH] SEBWIN-535: Fixed mapping of ping interval. --- .../DataMapping/ServerDataMapper.cs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ServerDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ServerDataMapper.cs index 125cbc4f..534a4f84 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ServerDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ServerDataMapper.cs @@ -26,9 +26,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping case Keys.Server.PerformFallback: MapPerformFallback(settings, value); break; - case Keys.Server.PingInterval: - MapPingInterval(settings, value); - break; case Keys.Server.RequestAttempts: MapRequestAttempts(settings, value); break; @@ -72,6 +69,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping { settings.Server.Institution = institution; } + + if (configuration.TryGetValue(Keys.Server.PingInterval, out v) && v is int interval) + { + settings.Server.PingInterval = interval; + } } } @@ -91,14 +93,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping } } - private void MapPingInterval(AppSettings settings, object value) - { - if (value is int interval) - { - settings.Server.PingInterval = interval; - } - } - private void MapRequestAttempts(AppSettings settings, object value) { if (value is int attempts)