From 8112bd0febcfa1e3a76e0d03363facbefc3822f7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 15 Oct 2012 13:17:30 +0200 Subject: Implement early connection release --- odb/sqlite/connection-factory.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'odb/sqlite/connection-factory.cxx') diff --git a/odb/sqlite/connection-factory.cxx b/odb/sqlite/connection-factory.cxx index 62e43f2..8eb9885 100644 --- a/odb/sqlite/connection-factory.cxx +++ b/odb/sqlite/connection-factory.cxx @@ -68,6 +68,7 @@ namespace odb { c->factory_ = 0; connection_.reset (inc_ref (c)); + connection_->recycle (); mutex_.unlock (); return false; } @@ -224,7 +225,10 @@ namespace odb in_use_--; if (keep) + { connections_.push_back (pooled_connection_ptr (inc_ref (c))); + connections_.back ()->recycle (); + } if (waiters_ != 0) cond_.signal (); -- cgit v1.1