MCPcopy Create free account
hub / github.com/ddnet/ddnet / Run

Method Run

src/engine/shared/http.cpp:799–812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

797}
798
799void 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
814void CHttp::Shutdown()
815{

Callers 1

RunLoopMethod · 0.45

Calls 2

OnCompletionInternalMethod · 0.80
str_copyFunction · 0.50

Tested by

no test coverage detected