From 6b36cd56f18a375719a2aab70dcfcc2f880606c1 Mon Sep 17 00:00:00 2001 From: Frank Park Date: Mon, 27 Mar 2017 00:50:59 -0400 Subject: [PATCH] disable connection pooling on construction --- include/sqlpp11/connection_pool.h | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/include/sqlpp11/connection_pool.h b/include/sqlpp11/connection_pool.h index 72004c80..92c3a1bd 100644 --- a/include/sqlpp11/connection_pool.h +++ b/include/sqlpp11/connection_pool.h @@ -51,21 +51,7 @@ namespace sqlpp public: connection_pool(const std::shared_ptr& config, unsigned int pool_size) : config(config), maximum_pool_size(pool_size) - { - std::lock_guard lock(connection_pool_mutex); - try - { - for (int i = 0; i < pool_size; i++) - { - free_connections.push(std::make_unique(config)); - } - } - catch (const sqlpp::exception& e) - { - std::cerr << "Failed to spawn a new connection." << std::endl; - throw; - } - } + {} ~connection_pool() = default; connection_pool(const connection_pool&) = delete; connection_pool(connection_pool&&) = delete;