From 9a23c62ba174144c9bb438a980c8bfc4a9e19661 Mon Sep 17 00:00:00 2001 From: Jess Robinson Date: Wed, 26 Jun 2024 11:17:33 +0000 Subject: [PATCH] Reopen all databases when reloading --- rmmxapianapi.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rmmxapianapi.cc b/rmmxapianapi.cc index 68d8a69..7594907 100644 --- a/rmmxapianapi.cc +++ b/rmmxapianapi.cc @@ -290,6 +290,9 @@ extern "C" { void EMSCRIPTEN_KEEPALIVE reloadDatabase() { dbc->db.reopen(); + for(Xapian::WritableDatabase dbw : dbc->addedWritableDatabases) { + dbw.reopen(); + } cout << "Database reopened" << endl; }