From 23f4eaedd82df2fd58b452f6e9730022f908a37a Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 5 Apr 2015 20:23:09 +0000 Subject: SteamWeb: tuned long polling git-svn-id: http://svn.miranda-ng.org/main/trunk@12619 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_polling.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_polling.cpp') diff --git a/protocols/SkypeWeb/src/skype_polling.cpp b/protocols/SkypeWeb/src/skype_polling.cpp index e963aad83b..a4534846b8 100644 --- a/protocols/SkypeWeb/src/skype_polling.cpp +++ b/protocols/SkypeWeb/src/skype_polling.cpp @@ -57,10 +57,8 @@ void CSkypeProto::PollingThread(void*) while (!isTerminated && !breaked && errors < POLLING_ERRORS_LIMIT) { PollRequest *request = new PollRequest(regToken, server); - NETLIBHTTPREQUEST *response = request->Send(m_hNetlibUser); - m_pollingConnection = request->nlc; - delete request; - + request->nlc = m_pollingConnection; + NETLIBHTTPREQUEST *response = request->Send(m_hNetlibUser); if (response != NULL) { @@ -71,14 +69,12 @@ void CSkypeProto::PollingThread(void*) continue; } ParsePollData (root); + + m_pollingConnection = response->nlc; + CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)response); } - /*if (response->resultCode != 200) - { - errors++; - continue; - } - else - errors = 0;*/ + + delete request; } m_hPollingThread = NULL; m_pollingConnection = NULL; -- cgit v1.2.3