From 3f121d842f04dca0b195219d5205815d4e66ca5b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 15 Jan 2019 14:55:35 +0300 Subject: code cleaning --- protocols/Icq10/src/http.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'protocols/Icq10/src') 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); -- cgit v1.2.3