Try to daemonize after tokio's runtime has been built

pull/77/head
Frank Denis 3 years ago
parent 630bcb67b2
commit 7cf89393c2

@ -550,13 +550,15 @@ fn main() -> Result<(), Error> {
std::process::exit(1);
})
.unwrap();
privdrop(&config)?;
let mut runtime_builder = tokio::runtime::Builder::new_multi_thread();
runtime_builder.enable_all();
runtime_builder.thread_name("encrypted-dns-");
let runtime = runtime_builder.build()?;
privdrop(&config)?;
let key_cache_capacity = config.dnscrypt.key_cache_capacity;
let cache_capacity = config.cache_capacity;
let state_file = &config.state_file;

Loading…
Cancel
Save