summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbpp/connectionPool.cpp6
-rw-r--r--libdbpp/connectionPool.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/libdbpp/connectionPool.cpp b/libdbpp/connectionPool.cpp
index 24a78fa..9dc3a1c 100644
--- a/libdbpp/connectionPool.cpp
+++ b/libdbpp/connectionPool.cpp
@@ -19,6 +19,12 @@ namespace DB {
}
void
+ ConnectionPool::returnTestResource(const Connection * c) const
+ {
+ c->finish();
+ }
+
+ void
ConnectionPool::testResource(const Connection * c) const
{
c->ping();
diff --git a/libdbpp/connectionPool.h b/libdbpp/connectionPool.h
index c2ce950..859c269 100644
--- a/libdbpp/connectionPool.h
+++ b/libdbpp/connectionPool.h
@@ -20,6 +20,8 @@ namespace DB {
/// Create a new connection.
Connection * createResource() const override;
/// Ping a connection.
+ void returnTestResource(const Connection *) const override;
+ /// Ping a connection.
void testResource(const Connection *) const override;
private: