refactor(gui-client): reduce scope of a Notify (#4238)

Ran into this while messing with #4232
This commit is contained in:
Reactor Scram
2024-03-21 09:06:30 -05:00
committed by GitHub
parent c94b2de02a
commit ae5fe281aa

View File

@@ -132,7 +132,6 @@ pub(crate) fn run(cli: &client::Cli) -> Result<(), Error> {
let _guard = rt.enter();
let (ctlr_tx, ctlr_rx) = mpsc::channel(5);
let notify_controller = Arc::new(Notify::new());
// Check for updates
let ctlr_tx_clone = ctlr_tx.clone();
@@ -248,7 +247,6 @@ pub(crate) fn run(cli: &client::Cli) -> Result<(), Error> {
ctlr_rx,
logging_handles,
advanced_settings,
notify_controller,
)
.await
});
@@ -772,7 +770,6 @@ async fn run_controller(
mut rx: mpsc::Receiver<ControllerRequest>,
logging_handles: client::logging::Handles,
advanced_settings: AdvancedSettings,
notify_controller: Arc<Notify>,
) -> Result<()> {
tracing::debug!("Reading / generating device ID...");
let device_id =
@@ -794,7 +791,7 @@ async fn run_controller(
session: None,
device_id,
logging_handles,
notify_controller,
notify_controller: Arc::new(Notify::new()), // TODO: Fix cancel-safety
tunnel_ready: false,
uptime: Default::default(),
};