diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-10-24 08:23:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-10-24 08:23:42 +0200 |
commit | 44d5647b4b92089fc90195b41373f6b99dc5c42c (patch) | |
tree | 8b11ace1051875e9d7ffe910885ca2790f2d1ca1 /bdep/deinit.cxx | |
parent | 282361b57f66b59a50ed3d073b46c7189c9553ee (diff) |
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).
Diffstat (limited to 'bdep/deinit.cxx')
-rw-r--r-- | bdep/deinit.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/bdep/deinit.cxx b/bdep/deinit.cxx index 735b746..18acf52 100644 --- a/bdep/deinit.cxx +++ b/bdep/deinit.cxx @@ -111,14 +111,16 @@ namespace bdep database db (open (prj, trace)); - transaction t (db.begin ()); - configurations cfgs ( - find_configurations (o, - prj, - t, - true /* fallback_default */, - !force /* validate */)); - t.commit (); + configurations cfgs; + { + transaction t (db.begin ()); + cfgs = find_configurations (o, + prj, + t, + true /* fallback_default */, + !force /* validate */); + t.commit (); + } // If specified, verify packages are present in each configuration. // |