summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_polling.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2015-12-19 20:41:45 +0000
committerRobert Pösel <robyer@seznam.cz>2015-12-19 20:41:45 +0000
commitf70f9ac1921caf88b7b85821a2bbeeb51e86f293 (patch)
tree564d9b6004e7a63c3e86f00dbbc7654febb4b620 /protocols/Steam/src/steam_polling.cpp
parent104e3eb32bebf907d928029a0a03e88c82d06cc1 (diff)
Steam: Fix ability to switch protocol to offline
Do relogin in PollingThread only if we still want to be online. Because we might call logout from Steam servers before we quit polling thread - so we always get at least one "Not Logged On" error. This commit stops doing relogin when our m_iStatus is already offline. git-svn-id: http://svn.miranda-ng.org/main/trunk@15901 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_polling.cpp')
-rw-r--r--protocols/Steam/src/steam_polling.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Steam/src/steam_polling.cpp b/protocols/Steam/src/steam_polling.cpp
index 0d278ee946..17a1aca1e2 100644
--- a/protocols/Steam/src/steam_polling.cpp
+++ b/protocols/Steam/src/steam_polling.cpp
@@ -227,7 +227,8 @@ void CSteamProto::PollingThread(void*)
// need to relogin
debugLog(_T("CSteamProto::PollingThread: Not Logged On"));
- if (Relogin())
+ // try to reconnect only when we're actually online (during normal logout we will still got this error anyway, but in that case our status is already offline)
+ if (IsOnline() && Relogin())
{
// load umqId and messageId again
umqId = getStringA("UMQID"); // it's ptrA so we can assign it without fearing a memory leak