diff options
author | Robert Pösel <robyer@seznam.cz> | 2016-12-04 12:30:47 +0100 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2016-12-04 12:30:47 +0100 |
commit | 30aa1e735ee6568f598c0b2a04e0b691d68c6a18 (patch) | |
tree | e632a3315092c05573d0c79388bc3c188361d136 /protocols | |
parent | 485351f4be14ea8739eedeae5a238889d8431f50 (diff) |
SkypeWeb: Disconnect only when 3 *consecutive* errors happens
Previously, errors counter wasn't reset when correct request arrived, so it could easily accumulate 3 errors during short time very easily, causing unneeded disconnections. This commit changes that behavior and makes disconnection happen only for 3 consecutive errors.
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/SkypeWeb/src/skype_polling.cpp | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_trouter.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_polling.cpp b/protocols/SkypeWeb/src/skype_polling.cpp index 9de9e4108d..90b4d3b178 100644 --- a/protocols/SkypeWeb/src/skype_polling.cpp +++ b/protocols/SkypeWeb/src/skype_polling.cpp @@ -43,6 +43,8 @@ void CSkypeProto::PollingThread(void*) if (response->resultCode == 200)
{
+ nErrors = 0;
+
if (response->pData)
{
char *pData = mir_strdup(response->pData);
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index 8249898e92..faf5e5c600 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -144,6 +144,8 @@ void CSkypeProto::TRouterThread(void*) if (response->resultCode == 200)
{
+ errors = 0;
+
if (response->pData)
{
char *json = strstr(response->pData, "{");
|