SEBWIN-535: Fixed mapping of ping interval.

This commit is contained in:
Damian Büchel 2022-01-06 14:35:34 +01:00
parent ab44eb6422
commit 87728f8301

View file

@ -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)