summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_trouter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/skype_trouter.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_trouter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp
index a1b6768ce9..0f9506ad6c 100644
--- a/protocols/SkypeWeb/src/skype_trouter.cpp
+++ b/protocols/SkypeWeb/src/skype_trouter.cpp
@@ -139,12 +139,13 @@ void CSkypeProto::TRouterThread(void*)
m_hTrouterEvent.Wait();
errors = 0;
+ TrouterPollRequest *request = new TrouterPollRequest(TRouter.socketIo, TRouter.connId, TRouter.st, TRouter.se, TRouter.sig, TRouter.instance, TRouter.ccid, TRouter.sessId);
+
while (errors < POLLING_ERRORS_LIMIT && m_iStatus > ID_STATUS_OFFLINE)
{
- TrouterPollRequest *request = new TrouterPollRequest(TRouter.socketIo, TRouter.connId, TRouter.st, TRouter.se, TRouter.sig, TRouter.instance, TRouter.ccid, TRouter.sessId);
request->nlc = m_TrouterConnection;
NLHR_PTR response(request->Send(m_hNetlibUser));
- delete request;
+
if (response == NULL)
{
m_TrouterConnection = nullptr;
@@ -174,6 +175,7 @@ void CSkypeProto::TRouterThread(void*)
}
m_TrouterConnection = response->nlc;
}
+ delete request;
}
m_hTrouterThread = NULL;
m_TrouterConnection = NULL;