Skip to content

Commit

Permalink
Revert incorrect changes in runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Finomnis committed Nov 1, 2024
1 parent d7e9114 commit ff99fb2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ impl SubsystemRunner {
Fut: 'static + Future<Output = Result<(), Err>> + Send,
Err: Into<ErrType>,
{
let future = {
let name = Arc::clone(&name);
async move { run_subsystem(name, subsystem, subsystem_handle, guard).await }
};

let future = async { run_subsystem(name, subsystem, subsystem_handle, guard).await };
let aborthandle = crate::spawn(future, "subsystem_runner").abort_handle();
SubsystemRunner { aborthandle }
}
Expand All @@ -61,7 +57,6 @@ async fn run_subsystem<Fut, Subsys, ErrType: ErrTypeTraits, Err>(
let mut redirected_subsystem_handle = subsystem_handle.delayed_clone();

let future = async { subsystem(subsystem_handle).await.map_err(|e| e.into()) };

let join_handle = crate::spawn(future, &name);

// Abort on drop
Expand Down

0 comments on commit ff99fb2

Please sign in to comment.