| 797 | } |
| 798 | |
| 799 | void CHttp::Run(std::shared_ptr<IHttpRequest> pRequest) |
| 800 | { |
| 801 | std::shared_ptr<CHttpRequest> pRequestImpl = std::static_pointer_cast<CHttpRequest>(pRequest); |
| 802 | std::unique_lock Lock(m_Lock); |
| 803 | if(m_Shutdown || m_State == CHttp::ERROR) |
| 804 | { |
| 805 | str_copy(pRequestImpl->m_aErr, "Shutting down"); |
| 806 | pRequestImpl->OnCompletionInternal(nullptr, CURLE_ABORTED_BY_CALLBACK); |
| 807 | return; |
| 808 | } |
| 809 | m_Cv.wait(Lock, [this]() { return m_State != CHttp::UNINITIALIZED; }); |
| 810 | m_PendingRequests.emplace_back(pRequestImpl); |
| 811 | curl_multi_wakeup(m_pMultiH); |
| 812 | } |
| 813 | |
| 814 | void CHttp::Shutdown() |
| 815 | { |
no test coverage detected