MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / unregister_http_client_request

Function unregister_http_client_request

Source/Http/HttpServer.cpp:1025–1038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1023}
1024
1025static void unregister_http_client_request(const std::shared_ptr<HttpRequestState>& request) {
1026 if (!request) {
1027 return;
1028 }
1029 if (request->finished.exchange(true, std::memory_order_relaxed)) {
1030 return;
1031 }
1032 const auto id = request->id;
1033 if (id == 0) {
1034 return;
1035 }
1036 std::lock_guard<std::mutex> lock(s_httpClientRequestMutex);
1037 s_httpClientRequests.erase(id);
1038}
1039
1040static std::shared_ptr<HttpRequestState> get_http_client_request(uint64_t id) {
1041 std::lock_guard<std::mutex> lock(s_httpClientRequestMutex);

Callers 3

postAsyncMethod · 0.85
getAsyncMethod · 0.85
downloadAsyncMethod · 0.85

Calls 2

exchangeMethod · 0.80
eraseMethod · 0.45

Tested by

no test coverage detected