Clone storage factories...

This commit is contained in:
Igor Katson 2024-05-02 20:16:14 +01:00
parent 07a5b69a25
commit 427f490a61
10 changed files with 62 additions and 21 deletions

View file

@ -297,6 +297,13 @@ async fn async_main(opts: Opts) -> anyhow::Result<()> {
},
enable_upnp_port_forwarding: !opts.disable_upnp,
default_defer_writes: opts.defer_writes,
default_storage_factory: Some({
if opts.experimental_mmap_storage {
MmapFilesystemStorageFactory::default().boxed()
} else {
FilesystemStorageFactory::default().boxed()
}
}),
};
let stats_printer = |session: Arc<Session>| async move {