remove double checking mutex (#528)
This commit is contained in:
Родитель
80f2c2f407
Коммит
760c645af0
|
@ -786,9 +786,6 @@ std::unique_ptr<CurlSession::CurlConnection> CurlSession::GetCurlConnection(Requ
|
|||
{
|
||||
std::string const& host = request.GetHost();
|
||||
|
||||
// Double-check locking. Check if there is any available connection before locking mutex
|
||||
auto& hostPoolFirstCheck = s_connectionPoolIndex[host];
|
||||
if (hostPoolFirstCheck.size() > 0)
|
||||
{
|
||||
// Critical section. Needs to own s_connectionPoolMutex before executing
|
||||
// Lock mutex to access connection pool. mutex is unlock as soon as lock is out of scope
|
||||
|
|
Загрузка…
Ссылка в новой задаче