From 086f3a4f5d9f5102d6ab8aa0551a629863f5b356 Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Wed, 22 Jan 2025 17:44:57 +0530 Subject: [PATCH] added suggested changes --- roles/jd-client/src/lib/mod.rs | 10 +++++----- roles/translator/src/lib/mod.rs | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/jd-client/src/lib/mod.rs b/roles/jd-client/src/lib/mod.rs index 01e32cb769..73eadf5f85 100644 --- a/roles/jd-client/src/lib/mod.rs +++ b/roles/jd-client/src/lib/mod.rs @@ -173,7 +173,7 @@ impl JobDeclaratorClient { _ = self.shutdown.notified().fuse() => { info!("Shutting down gracefully..."); handler.abort(); - break 'outer; + break; } }; } @@ -371,11 +371,11 @@ impl JobDeclaratorClient { .await; } - /// Notifies the JD-Client to shut down gracefully. + /// Closes JDC role and any open connection associated with it. /// - /// This method triggers the shutdown process by sending a notification. - /// It ensures that any ongoing operations are properly handled before - /// the jd-client stops functioning. + /// Note that this method will result in a full exit of the running + /// jd-client and any open connection most be re-initiated upon new + /// start. #[allow(dead_code)] pub fn shutdown(&self) { self.shutdown.notify_one(); diff --git a/roles/translator/src/lib/mod.rs b/roles/translator/src/lib/mod.rs index b04267f67d..d2b837d9d7 100644 --- a/roles/translator/src/lib/mod.rs +++ b/roles/translator/src/lib/mod.rs @@ -288,11 +288,11 @@ impl TranslatorSv2 { task_collector.safe_lock(|t| t.push((task.abort_handle(), "init task".to_string()))); } - /// Notifies the translator to shut down gracefully. + /// Closes Translator role and any open connection associated with it. /// - /// This method triggers the shutdown process by sending a notification. - /// It ensures that any ongoing operations are properly handled before - /// the translator stops functioning. + /// Note that this method will result in a full exit of the running + /// Translator and any open connection most be re-initiated upon new + /// start. pub fn shutdown(&self) { self.shutdown.notify_last(); }