Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

Commented Unassigned: http_linux : race condition in linux_connection_pool::obtain() ? [320]

$
0
0
Method checks if pool is empty ; if not, it take the first connection from pool.
However, IIUC, pool is locked in underlying methods is_pool_empty() and get_head(), so this does not work reliably (get_head() may fail, unless a higher lock ensures this can not happen)

if (is_pool_empty())
{
// No connections in pool => create a new connection instance.
return std::make_shared<linux_connection>(m_io_service);
}
else
{
// Reuse connection from pool.
auto connection(get_head());
connection->start_reuse();
return connection;
}

Comments: This has been fixed in the development branch and will be in the 2.4.0 release. Thanks for reporting the issue.

Viewing all articles
Browse latest Browse all 4845

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>