aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/connection-factory.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-15 13:17:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-19 11:40:30 +0200
commit8112bd0febcfa1e3a76e0d03363facbefc3822f7 (patch)
tree0f5a05b9b29ae7d77e95f7831c214b385aaf6a3b /odb/sqlite/connection-factory.cxx
parentd94948b8bccfd8748245726487d54c41bb199baf (diff)
Implement early connection release
Diffstat (limited to 'odb/sqlite/connection-factory.cxx')
-rw-r--r--odb/sqlite/connection-factory.cxx4
1 files changed, 4 insertions, 0 deletions
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 ();