Add HTTP bandwidth throttling for every other responder.
Most notably getMesh (the only one possibly using any significant bandwidth), but in general every type of requests that just have to happen anyway and in the order they are requested: they are just passed to the curl thread, but now the curl thread will queue them and hold back if the (general) service they use is loaded too heavily.
This commit is contained in:
@@ -75,10 +75,15 @@ std::string LLURLRequest::actionAsVerb(LLURLRequest::ERequestAction action)
|
||||
|
||||
// This might throw AICurlNoEasyHandle.
|
||||
LLURLRequest::LLURLRequest(LLURLRequest::ERequestAction action, std::string const& url, Injector* body,
|
||||
LLHTTPClient::ResponderPtr responder, AIHTTPHeaders& headers, bool keepalive, bool is_auth, bool compression) :
|
||||
LLHTTPClient::ResponderPtr responder, AIHTTPHeaders& headers, bool keepalive, bool is_auth, bool compression,
|
||||
bool queue_if_too_much_bandwidth_usage) :
|
||||
mAction(action), mURL(url), mKeepAlive(keepalive), mIsAuth(is_auth), mNoCompression(!compression),
|
||||
mBody(body), mResponder(responder), mHeaders(headers), mResponderNameCache(responder ? responder->getName() : "<uninitialized>")
|
||||
{
|
||||
if (queue_if_too_much_bandwidth_usage)
|
||||
{
|
||||
AICurlEasyRequest_wat(*mCurlEasyRequest)->queue_if_too_much_bandwidth_usage();
|
||||
}
|
||||
}
|
||||
|
||||
void LLURLRequest::initialize_impl(void)
|
||||
|
||||
Reference in New Issue
Block a user