diff --git a/common/client-libs/gateway-client/src/client.rs b/common/client-libs/gateway-client/src/client.rs index 2c6226a013..e859822226 100644 --- a/common/client-libs/gateway-client/src/client.rs +++ b/common/client-libs/gateway-client/src/client.rs @@ -309,6 +309,8 @@ impl GatewayClient { async { if let Some(mut s) = m_shutdown { s.recv().await + } else { + std::future::pending::<()>().await } } .fuse() @@ -317,7 +319,7 @@ impl GatewayClient { tokio::pin!(shutdown); #[cfg(target_arch = "wasm32")] - let mut shutdown = Box::pin(async {}.fuse()); + let mut shutdown = std::future::pending::<()>().fuse(); loop { futures::select! {