diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-30 18:00:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-30 18:00:45 +0300 |
commit | 484310a70f4152b15dcbae24ed9e23009ae77c26 (patch) | |
tree | bca0e19889336d7b6ec45d6abf85c78dce18a52e /protocols/Icq10 | |
parent | 72a3eccff9871ce57b12d2a282d50bef6bbcd05c (diff) |
Icq10:
- fixes #1695 (socket leak);
- fixes timeout error in long poll connection
Diffstat (limited to 'protocols/Icq10')
-rw-r--r-- | protocols/Icq10/src/http.cpp | 2 | ||||
-rw-r--r-- | protocols/Icq10/src/server.cpp | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/protocols/Icq10/src/http.cpp b/protocols/Icq10/src/http.cpp index 4681a4d135..0d66a3ae71 100644 --- a/protocols/Icq10/src/http.cpp +++ b/protocols/Icq10/src/http.cpp @@ -159,7 +159,7 @@ void CIcqProto::ExecuteRequest(AsyncHttpRequest *pReq) (this->*(pReq->m_pFunc))(reply, pReq); if (pReq->m_conn != CONN_NONE) - m_ConnPool[pReq->m_conn] = pReq->nlc; + m_ConnPool[pReq->m_conn] = reply->nlc; Netlib_FreeHttpRequest(reply); } diff --git a/protocols/Icq10/src/server.cpp b/protocols/Icq10/src/server.cpp index 5312c4e880..e164de867e 100644 --- a/protocols/Icq10/src/server.cpp +++ b/protocols/Icq10/src/server.cpp @@ -589,7 +589,10 @@ void __cdecl CIcqProto::PollThread(void*) } else szUrl.Append("&timeout=60000"); - ExecuteRequest(new AsyncHttpRequest(CONN_FETCH, REQUEST_GET, szUrl, &CIcqProto::OnFetchEvents)); + auto *pReq = new AsyncHttpRequest(CONN_FETCH, REQUEST_GET, szUrl, &CIcqProto::OnFetchEvents); + if (!bFirst) + pReq->timeout = 62000; + ExecuteRequest(pReq); } debugLogA("Polling thread ended"); |