From c4ec14219941c5f9a359359946212bc6c6c2e459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sat, 22 Nov 2014 13:44:12 +0000 Subject: Steam: Fix polling thread to disconnect protocol on error git-svn-id: http://svn.miranda-ng.org/main/trunk@11038 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_pooling.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'protocols') diff --git a/protocols/Steam/src/steam_pooling.cpp b/protocols/Steam/src/steam_pooling.cpp index 15d39f8cbe..2c07872fe3 100644 --- a/protocols/Steam/src/steam_pooling.cpp +++ b/protocols/Steam/src/steam_pooling.cpp @@ -210,7 +210,7 @@ void CSteamProto::PollingThread(void*) json_delete(root); continue; } - else if (!lstrcmpi(error, L"Not Logged On")) + /*else if (!lstrcmpi(error, L"Not Logged On")) // 'else' below will handle this error, we don't need this particular check right now { if (!IsOnline()) { @@ -221,11 +221,11 @@ void CSteamProto::PollingThread(void*) } breaked = true; - } - else if (lstrcmpi(error, L"Timeout")) + }*/ + else { // something wrong - debugLogA("CSteamProto::PollingThread: error (%d)", response->resultCode); + debugLogA("CSteamProto::PollingThread: %s (%d)", _T2A(error), response->resultCode); // token has expired if (response->resultCode == HTTP_STATUS_UNAUTHORIZED) @@ -242,4 +242,8 @@ void CSteamProto::PollingThread(void*) m_hPollingThread = NULL; debugLogA("CSteamProto::PollingThread: leaving"); + + // if something wrong, switch proto to offline + if (breaked) + SetStatus(ID_STATUS_OFFLINE); } \ No newline at end of file -- cgit v1.2.3