From f70f9ac1921caf88b7b85821a2bbeeb51e86f293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sat, 19 Dec 2015 20:41:45 +0000 Subject: 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 --- protocols/Steam/src/steam_polling.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'protocols') 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 -- cgit v1.2.3