From 44d5647b4b92089fc90195b41373f6b99dc5c42c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 24 Oct 2019 08:23:42 +0200 Subject: Close database as soon as possible This becomes important if we trigger a recursive implicit sync that uses the same database (e.g., in a build system module project). --- bdep/ci.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bdep/ci.cxx') diff --git a/bdep/ci.cxx b/bdep/ci.cxx index 08f2578..81db678 100644 --- a/bdep/ci.cxx +++ b/bdep/ci.cxx @@ -200,10 +200,13 @@ namespace bdep false /* load_packages */)); const dir_path& prj (pp.project); - database db (open (prj, trace)); shared_ptr cfg; { + // Don't keep the database open longer than necessary. + // + database db (open (prj, trace)); + transaction t (db.begin ()); configurations cfgs (find_configurations (o, prj, t)); t.commit (); -- cgit v1.1