This commit is contained in:
JustArchi
2018-12-12 22:24:05 +01:00
parent c7ef612bee
commit c850691906

View File

@@ -1557,16 +1557,22 @@ namespace ArchiSteamFarm {
// Let's try to register a new key
if (!await RegisterApiKey().ConfigureAwait(false)) {
// Request timed out, bad luck, we'll try again later
return (false, null);
goto case ESteamApiKeyState.Timeout;
}
// We should have the key ready, so let's fetch it again
result = await GetApiKeyState().ConfigureAwait(false);
if (result.State != ESteamApiKeyState.Registered) {
// Something went wrong, bad luck, we'll try again later
if (result.State == ESteamApiKeyState.Timeout) {
// Request timed out, bad luck, we'll try again later
goto case ESteamApiKeyState.Timeout;
}
if (result.State != ESteamApiKeyState.Registered) {
// Something went wrong, report error
goto default;
}
goto case ESteamApiKeyState.Registered;
case ESteamApiKeyState.Registered:
// We succeeded in fetching API key, and it resulted in registered key