Formerly the xapian database object was deleted and closed in its
destructor once the object was garbage collected. Explicitly call
close() so that the database and the associated lock is released
immediately.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
---
lib/database.cc | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/database.cc b/lib/database.cc
index 5efa85e..79cf375 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -726,6 +726,10 @@ notmuch_database_close (notmuch_database_t *notmuch)
}
}
+ if (notmuch->xapian_db != NULL) {
+ notmuch->xapian_db->close();
+ }
+
delete notmuch->term_gen;
delete notmuch->query_parser;
delete notmuch->xapian_db;
--
1.7.9