diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-04-05 20:23:09 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-04-05 20:23:09 +0000 |
commit | 23f4eaedd82df2fd58b452f6e9730022f908a37a (patch) | |
tree | b7c483f960101eaa4adc4f8b5b9f1bea7514cf30 /protocols/SkypeWeb/src/skype_polling.cpp | |
parent | 3ffa79499e8b9c270fa33c1f1b90ef9b09fe43be (diff) |
SteamWeb: tuned long polling
git-svn-id: http://svn.miranda-ng.org/main/trunk@12619 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_polling.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_polling.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
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;
|