From 2b3161773fd1e757e08102b84f72e56535e86af9 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sun, 2 Aug 2026 19:29:33 +0200 Subject: [PATCH] Propagate tokio runtime creation failure in graphene-cli --- node-graph/graphene-cli/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node-graph/graphene-cli/src/main.rs b/node-graph/graphene-cli/src/main.rs index 77203880f7..81311bdda6 100644 --- a/node-graph/graphene-cli/src/main.rs +++ b/node-graph/graphene-cli/src/main.rs @@ -31,8 +31,8 @@ impl NodeGraphUpdateSender for UpdateLogger { struct TokioSpawner(Option); impl TokioSpawner { - fn new() -> Self { - Self(Some(tokio::runtime::Runtime::new().expect("Failed to start the async source runtime"))) + fn new() -> Result { + Ok(Self(Some(tokio::runtime::Runtime::new()?))) } } @@ -202,7 +202,7 @@ fn main() -> Result<(), Box> { let preferences = EditorPreferences { max_render_region_size: EditorPreferences::default().max_render_region_size, }; - let graph_runtime: Arc = Arc::new(GraphRuntime::new(Box::new(TokioSpawner::new()) as Box)); + let graph_runtime: Arc = Arc::new(GraphRuntime::new(Box::new(TokioSpawner::new()?) as Box)); let (completion_sender, completion_receiver) = std::sync::mpsc::channel(); graph_runtime.set_notifier(Arc::new(move || { let _ = completion_sender.send(());