We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5caac19 commit e29426dCopy full SHA for e29426d
Release/src/http/client/http_client_asio.cpp
@@ -406,10 +406,10 @@ void asio_connection_pool_map::free_connection_pool(const boost::system::error_c
406
if (!ec)
407
{
408
std::lock_guard<std::mutex> lg(m_connection_pool_map_mutex);
409
- auto &pool = m_connection_pool_map[pool_key];
410
- if (pool && pool.use_count() == 1)
+ auto it = m_connection_pool_map.find(pool_key);
+ if (it != m_connection_pool_map.end() && it->second.use_count() == 1)
411
412
- m_connection_pool_map.erase(pool_key);
+ m_connection_pool_map.erase(it);
413
}
414
415
0 commit comments