nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit 7a134ac03ee4ec8e639b5add57a46771c2669e1f
parent 3a464620ae3e86df7661fbbcacaca7500b098839
Author: William Casarin <jb55@jb55.com>
Date:   Wed,  9 Aug 2023 21:01:26 -0700

ndb: close db after threads

otherwise bad stuff happens

Diffstat:
Mnostrdb.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nostrdb.c b/nostrdb.c @@ -416,12 +416,12 @@ void ndb_destroy(struct ndb *ndb) if (ndb == NULL) return; - mdb_env_close(ndb->env); - // ingester depends on writer and must be destroyed first ndb_ingester_destroy(&ndb->ingester); ndb_writer_destroy(&ndb->writer); + mdb_env_close(ndb->lmdb.env); + free(ndb); }