1 files changed, 5 insertions, 0 deletions
diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp
index 9f408a73..250d106d 100644
--- a/src/ChatPage.cpp
+++ b/src/ChatPage.cpp
@@ -1070,6 +1070,11 @@ ChatPage::trySync()
emit syncTopBar(updates);
emit syncRoomlist(updates);
+
+ cache::client()->deleteOldData();
+ } catch (const lmdb::map_full_error &e) {
+ nhlog::db()->error("lmdb is full: {}", e.what());
+ cache::client()->deleteOldData();
} catch (const lmdb::error &e) {
nhlog::db()->error("saving sync response: {}", e.what());
}
|