This commit is contained in:
kssenii 2021-04-02 21:26:19 +00:00
parent e3fac9ef32
commit 7c162d30b7

View File

@ -24,12 +24,13 @@ public:
~ConnectionHolder()
{
pool->returnObject(std::move(connection));
if (connection)
pool->returnObject(std::move(connection));
}
nanodbc::connection & operator*()
{
if (!connection || !connection->connected())
if (!connection)
{
pool->borrowObject(connection, [&]()
{