From cd0fc1c438fea66cbf7a15870fc50d821ac224cb Mon Sep 17 00:00:00 2001 From: JustArchi Date: Mon, 1 May 2017 20:01:50 +0200 Subject: [PATCH] Misc --- ArchiSteamFarm/ArchiWebHandler.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ArchiSteamFarm/ArchiWebHandler.cs b/ArchiSteamFarm/ArchiWebHandler.cs index e2178e5be..ee4497230 100644 --- a/ArchiSteamFarm/ArchiWebHandler.cs +++ b/ArchiSteamFarm/ArchiWebHandler.cs @@ -1040,7 +1040,7 @@ namespace ArchiSteamFarm { return true; } - private async Task GetApiKey(bool allowRegister = true) { + private async Task GetApiKey() { if (CachedSteamApiKey != null) { // We fetched API key already, and either got valid one, or permanent AccessDenied // In any case, this is our final result @@ -1069,12 +1069,7 @@ namespace ArchiSteamFarm { return CachedSteamApiKey; case ESteamApiKeyState.NotRegisteredYet: // We succeeded in fetching API key, and it resulted in no key registered yet - if (!allowRegister) { - // But this call doesn't allow us to register it, so return null - return null; - } - - // If we're allowed to register the key, let's do so + // Let's try to register a new key if (!await RegisterApiKey().ConfigureAwait(false)) { // Request timed out, bad luck, we'll try again later return null;