From 8c323a2069eccf2021844a4d8f0bc1f8d79cda75 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Thu, 21 Jul 2022 12:11:19 +0300 Subject: [PATCH] Stop RPC servers on drop (#11679) * Stop RPC servers on drop * Switch to existing wrappers that stop RPC servers * Apply formatting --- substrate/client/service/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/substrate/client/service/src/lib.rs b/substrate/client/service/src/lib.rs index 1b70227a70..2e7b611ffb 100644 --- a/substrate/client/service/src/lib.rs +++ b/substrate/client/service/src/lib.rs @@ -369,7 +369,8 @@ where match tokio::task::block_in_place(|| { config.tokio_handle.block_on(futures::future::try_join(http_fut, ws_fut)) }) { - Ok((http, ws)) => Ok(Box::new((http, ws))), + Ok((http, ws)) => + Ok(Box::new((waiting::HttpServer(Some(http)), waiting::WsServer(Some(ws))))), Err(e) => Err(Error::Application(e)), } }