From 5f0a5dd0e95cb7249a9e076a5126e2c213e2b304 Mon Sep 17 00:00:00 2001 From: Frank Park Date: Sun, 26 Mar 2017 21:53:09 -0400 Subject: [PATCH] rename function --- include/sqlpp11/connection_pool.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/sqlpp11/connection_pool.h b/include/sqlpp11/connection_pool.h index d81e8c89..72004c80 100644 --- a/include/sqlpp11/connection_pool.h +++ b/include/sqlpp11/connection_pool.h @@ -44,6 +44,8 @@ namespace sqlpp unsigned int maximum_pool_size = 0; std::stack> free_connections; + bool is_connection_compatible(const std::unique_ptr& connection) { + return connection->get_config().get() == this->config.get(); } public: @@ -105,6 +107,7 @@ namespace sqlpp { if (connection.get()) { + if (is_connection_compatible(connection)) { free_connections.push(std::move(connection)); }