This commit is contained in:
Archi
2023-02-12 18:48:03 +01:00
parent 5bdfab5fb2
commit 64c5cec113

View File

@@ -2767,6 +2767,20 @@ public sealed class ArchiWebHandler : IDisposable {
return (false, null);
}
if (!Initialized) {
byte connectionTimeout = ASF.GlobalConfig?.ConnectionTimeout ?? GlobalConfig.DefaultConnectionTimeout;
for (byte i = 0; (i < connectionTimeout) && !Initialized && Bot.IsConnectedAndLoggedOn; i++) {
await Task.Delay(1000).ConfigureAwait(false);
}
if (!Initialized) {
Bot.ArchiLogger.LogGenericWarning(Strings.WarningFailed);
return (false, null);
}
}
Dictionary<string, object?> arguments = new(2, StringComparer.Ordinal) {
// ReSharper disable once RedundantSuppressNullableWarningExpression - required for .NET Framework
{ "key", steamApiKey! },