From 485351f4be14ea8739eedeae5a238889d8431f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 4 Dec 2016 12:25:02 +0100 Subject: SkypeWeb: Switch to offline on error in trouter (fixes #622) --- protocols/SkypeWeb/src/skype_trouter.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'protocols/SkypeWeb') diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index 312d7f4ec4..8249898e92 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -159,12 +159,20 @@ void CSkypeProto::TRouterThread(void*) } else { + errors++; + SendRequest(new HealthTrouterRequest(TRouter.ccid.c_str()), &CSkypeProto::OnHealth); m_hTrouterHealthEvent.Wait(); } m_TrouterConnection = response->nlc; } delete request; + + if (m_iStatus != ID_STATUS_OFFLINE) + { + debugLogA(__FUNCTION__ ": unexpected termination; switching protocol to offline"); + SetStatus(ID_STATUS_OFFLINE); + } } m_hTrouterThread = NULL; m_TrouterConnection = NULL; -- cgit v1.2.3