mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Update connection_pool.h (#363)
This commit is contained in:
parent
9203e3818f
commit
739b3db69c
@ -172,6 +172,7 @@ namespace sqlpp
|
||||
connection_pool& operator=(connection_pool&&) = delete;
|
||||
|
||||
pool_connection<Connection_config, Reconnect_policy, Connection> get_connection()
|
||||
{
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(connection_pool_mutex);
|
||||
if (!free_connections.empty())
|
||||
@ -180,6 +181,7 @@ namespace sqlpp
|
||||
free_connections.pop();
|
||||
return pool_connection<Connection_config, Reconnect_policy, Connection>(connection, this);
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user