diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-15 14:55:35 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-15 14:55:35 +0300 |
commit | 3f121d842f04dca0b195219d5205815d4e66ca5b (patch) | |
tree | 1ce6c0a1ba621bd40946969f638513099e87ff0a /protocols/Icq10/src | |
parent | d870d3e4c02e0093875ad0202acd4979cbc3a97a (diff) |
code cleaning
Diffstat (limited to 'protocols/Icq10/src')
-rw-r--r-- | protocols/Icq10/src/http.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/Icq10/src/http.cpp b/protocols/Icq10/src/http.cpp index 6552dabb3d..e0bd34d17a 100644 --- a/protocols/Icq10/src/http.cpp +++ b/protocols/Icq10/src/http.cpp @@ -35,6 +35,7 @@ void __cdecl CIcqProto::ServerThread(void*) break; while (true) { + bool bNeedSleep = false; AsyncHttpRequest *pReq; { mir_cslock lck(m_csHttpQueue); @@ -43,10 +44,14 @@ void __cdecl CIcqProto::ServerThread(void*) pReq = m_arHttpQueue[0]; m_arHttpQueue.remove(0); + bNeedSleep = (m_arHttpQueue.getCount() > 1); } if (m_bTerminated) break; + ExecuteRequest(pReq); + if (bNeedSleep) + Sleep(200); } int ts = time(0); |