From 7b0028d75a266d6b412e018e7d7e5dedea6aad73 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 2 Jul 2020 13:02:08 +0200 Subject: [PATCH] Drop the tokio runtime before the task_manager (#6548) * Initial commit Forked at: ece036417001b115bf6e14383b2d1ae33ee327c4 Parent branch: origin/master * Drop the tokio runtime before the task_manager The tokio runtime must be dropped before the task_manager. Otherwise the objects the task_manager keep alive are dropped before the tasks are finished. --- substrate/client/cli/src/runner.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/client/cli/src/runner.rs b/substrate/client/cli/src/runner.rs index 807a5620ec..05445c9d85 100644 --- a/substrate/client/cli/src/runner.rs +++ b/substrate/client/cli/src/runner.rs @@ -236,7 +236,7 @@ impl Runner { self.tokio_runtime.block_on(main(task_manager.future().fuse())) .map_err(|e| e.to_string())?; task_manager.terminate(); - drop(task_manager); + drop(self.tokio_runtime); Ok(()) }