From 3eeda4a421cb8911dc9a553085f9c978ca8a898a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan-=C8=98tefan=20Neac=C5=9Fu?= Date: Thu, 15 Sep 2022 17:35:41 +0300 Subject: [PATCH] Apply fix for socket_state too (#1627) --- common/client-libs/gateway-client/src/socket_state.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/client-libs/gateway-client/src/socket_state.rs b/common/client-libs/gateway-client/src/socket_state.rs index 8194f7c8c7..bc1111ab09 100644 --- a/common/client-libs/gateway-client/src/socket_state.rs +++ b/common/client-libs/gateway-client/src/socket_state.rs @@ -113,6 +113,8 @@ impl PartiallyDelegated { async { if let Some(mut s) = m_shutdown { s.recv().await + } else { + std::future::pending::<()>().await } } .fuse() @@ -121,7 +123,7 @@ impl PartiallyDelegated { tokio::pin!(shutdown); #[cfg(target_arch = "wasm32")] - let mut shutdown = Box::pin(async {}.fuse()); + let mut shutdown = std::future::pending::<()>().fuse(); let ret_err = loop { futures::select! {