Add AIPerService::CapabilityType::mConcurrectConnections
Prepares for throttling number of connections per capability type. The value is current left at AIPerService::mConcurrectConnections, so not having an effect yet.
This commit is contained in:
@@ -1736,7 +1736,7 @@ bool MultiHandle::add_easy_request(AICurlEasyRequest const& easy_request, bool f
|
||||
}
|
||||
bool too_much_bandwidth = !curl_easy_request_w->approved() && AIPerService::checkBandwidthUsage(per_service, get_clock_count() * HTTPTimeout::sClockWidth_40ms);
|
||||
PerService_wat per_service_w(*per_service);
|
||||
if (!too_much_bandwidth && sTotalAdded < curl_max_total_concurrent_connections && !per_service_w->throttled())
|
||||
if (!too_much_bandwidth && sTotalAdded < curl_max_total_concurrent_connections && !per_service_w->throttled(capability_type))
|
||||
{
|
||||
curl_easy_request_w->set_timeout_opts();
|
||||
if (curl_easy_request_w->add_handle_to_multi(curl_easy_request_w, mMultiHandle) == CURLM_OK)
|
||||
|
||||
Reference in New Issue
Block a user