diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-11-22 13:44:12 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-11-22 13:44:12 +0000 |
commit | c4ec14219941c5f9a359359946212bc6c6c2e459 (patch) | |
tree | eaa8db0e2bb8543908d782e22a09c0b19dc1f923 /protocols/Steam/src | |
parent | cc5b9e03d48177aeeafdf9d5bd9e51f7963eae56 (diff) |
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
Diffstat (limited to 'protocols/Steam/src')
-rw-r--r-- | protocols/Steam/src/steam_pooling.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
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 |