From 793fac514ab8269f2c1253e8b1bd78557acfb3c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Tue, 6 Dec 2022 13:00:11 +0000 Subject: [PATCH] Making native client wait for shutdown --- clients/native/src/client/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clients/native/src/client/mod.rs b/clients/native/src/client/mod.rs index a4e4867c6c..7e441c79a7 100644 --- a/clients/native/src/client/mod.rs +++ b/clients/native/src/client/mod.rs @@ -96,7 +96,7 @@ impl SocketClient { /// blocking version of `start_socket` method. Will run forever (or until SIGINT is sent) pub async fn run_socket_forever(self) -> Result<(), ClientError> { - let shutdown = self.start_socket().await?; + let mut shutdown = self.start_socket().await?; wait_for_signal().await; println!( @@ -109,8 +109,8 @@ impl SocketClient { // Some of these components have shutdown signalling implemented as part of socks5 work, // but since it's not fully implemented (yet) for all the components of the native client, // we don't try to wait and instead just stop immediately. - //log::info!("Waiting for tasks to finish... (Press ctrl-c to force)"); - //shutdown.wait_for_shutdown().await; + log::info!("Waiting for tasks to finish... (Press ctrl-c to force)"); + shutdown.wait_for_shutdown().await; log::info!("Stopping nym-client"); Ok(())