summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 5b899ca58c..c480b74cc8 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -961,7 +961,17 @@ int CVkProto::PollServer()
if (!IsOnline()){
debugLogA("CVkProto::PollServer is dead (not online)");
m_pollingConn = NULL;
- ShutdownSession();
+ if (m_iPollConnRetry){
+ m_iPollConnRetry--;
+ debugLogA("CVkProto::PollServer restarting %d", MAX_RETRIES - m_iPollConnRetry);
+ Sleep(1000);
+ PollServer();
+ }
+ else {
+ debugLogA("CVkProto::PollServer => ShutdownSession");
+ m_iPollConnRetry = MAX_RETRIES;
+ ShutdownSession();
+ }
return 0;
}