enter the tokio runtime for the scope of main init
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
f69c596f56
commit
4f97ff98d6
1 changed files with 2 additions and 0 deletions
|
@ -24,6 +24,8 @@ pub(crate) struct Server {
|
||||||
|
|
||||||
impl Server {
|
impl Server {
|
||||||
pub(crate) fn build(args: &Args, runtime: Option<&runtime::Handle>) -> Result<Arc<Self>, Error> {
|
pub(crate) fn build(args: &Args, runtime: Option<&runtime::Handle>) -> Result<Arc<Self>, Error> {
|
||||||
|
let _runtime_guard = runtime.map(runtime::Handle::enter);
|
||||||
|
|
||||||
let raw_config = Config::load(args.config.as_deref())?;
|
let raw_config = Config::load(args.config.as_deref())?;
|
||||||
let raw_config = crate::clap::update(raw_config, args)?;
|
let raw_config = crate::clap::update(raw_config, args)?;
|
||||||
let config = Config::new(&raw_config)?;
|
let config = Config::new(&raw_config)?;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue