From 5f6ff4c2b71112c080dc16e0c0c46d2402da2c88 Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Tue, 21 Feb 2023 08:14:19 -0600 Subject: [PATCH] fix: in-memory SQLite DB correctly shares memory between connections fixes: https://todo.sr.ht/~gheartsfield/nostr-rs-relay/73#event-227131 --- src/repo/sqlite.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repo/sqlite.rs b/src/repo/sqlite.rs index 3a91783..cf8bf59 100644 --- a/src/repo/sqlite.rs +++ b/src/repo/sqlite.rs @@ -932,7 +932,7 @@ pub fn build_pool( } } let manager = if settings.database.in_memory { - SqliteConnectionManager::memory() + SqliteConnectionManager::file("file::memory:?cache=shared") .with_flags(flags) .with_init(|c| c.execute_batch(STARTUP_SQL)) } else {