Skip to content

Commit

Permalink
Propagate error when we fail to initialize Tokio runtime in block_on
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Nov 19, 2020
1 parent f05a216 commit 53ae372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion light-client/src/utils/block_on.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ where
let rt = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.unwrap();
.map_err(|_| IoError::Runtime)?;

if let Some(timeout) = timeout {
let task = async { tokio::time::timeout(timeout, f).await };
Expand Down

0 comments on commit 53ae372

Please sign in to comment.