From 70ed8704f79e79d1a4ce49f651a0887bde7a94f5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 30 Jan 2020 18:00:14 +0300 Subject: fixes #1583 (Steam: enhanced processing of error code 401) --- protocols/Steam/src/steam_login.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'protocols/Steam/src') diff --git a/protocols/Steam/src/steam_login.cpp b/protocols/Steam/src/steam_login.cpp index 4537b52532..80dee8a4f3 100644 --- a/protocols/Steam/src/steam_login.cpp +++ b/protocols/Steam/src/steam_login.cpp @@ -317,16 +317,17 @@ void CSteamProto::HandleTokenExpired() void CSteamProto::OnLoggedOn(const HttpResponse &response, void *) { - if (!response.IsSuccess()) { - // Probably timeout or no connection, we can do nothing here - debugLogA(__FUNCTION__ ": unknown login error"); + if (response.GetStatusCode() == HTTP_CODE_UNAUTHORIZED) { + // Probably expired TokenSecret SetStatus(ID_STATUS_OFFLINE); + HandleTokenExpired(); return; } - if (response.GetStatusCode() == HTTP_CODE_UNAUTHORIZED) { - // Probably expired TokenSecret - HandleTokenExpired(); + if (!response.IsSuccess()) { + // Probably timeout or no connection, we can do nothing here + debugLogA(__FUNCTION__ ": unknown login error"); + SetStatus(ID_STATUS_OFFLINE); return; } -- cgit v1.2.3