diff options
author | Dave Houlton <euclid@lindenlab.com> | 2021-02-02 16:11:44 +0000 |
---|---|---|
committer | Dave Houlton <euclid@lindenlab.com> | 2021-02-02 16:11:44 +0000 |
commit | de711c213820521aa8afcf991b4af561db54aede (patch) | |
tree | 108e7d0dcb12f6f827d78a0a30b28e33a8cb95f0 /indra/llcorehttp | |
parent | 25186d07acdeb3ba079594f8f0f8677626b1baf6 (diff) | |
parent | 7af677ab442b4bb28f009f3715b8913aecd565fa (diff) |
Merged in DV528-rebase-6.4.13 (pull request #461)
DRTVWR-528 rebase to 6.4.13
Diffstat (limited to 'indra/llcorehttp')
-rw-r--r-- | indra/llcorehttp/_httpoprequest.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index 7bea8e9f9c..ba31290c24 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -567,16 +567,9 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) // Use the viewer-based thread-safe API which has a // fast/safe check for proxy enable. Would like to // encapsulate this someway... - if (LLProxy::instanceExists()) - { - // Make sure proxy won't be initialized from here, - // it might conflict with LLStartUp::startLLProxy() - LLProxy::getInstance()->applyProxySettings(mCurlHandle); - } - else - { - LL_WARNS() << "Proxy is not initialized!" << LL_ENDL; - } + // Make sure proxy won't be getInstance() from here, + // it is not thread safe + LLProxy::applyProxySettings(mCurlHandle); } else if (gpolicy.mHttpProxy.size()) @@ -817,6 +810,7 @@ size_t HttpOpRequest::readCallback(void * data, size_t size, size_t nmemb, void const size_t do_size((std::min)(req_size, body_size - op->mCurlBodyPos)); const size_t read_size(op->mReqBody->read(op->mCurlBodyPos, static_cast<char *>(data), do_size)); + // FIXME: singleton's instance() is Thread unsafe! Even if stats accumulators inside are. HTTPStats::instance().recordDataUp(read_size); op->mCurlBodyPos += read_size; return read_size; |