Skip to content

Commit 02089db

Browse files
committed
Fix on_prepare_restart
1 parent 6910bcd commit 02089db

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mullvad-daemon/src/lib.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ where
946946
}
947947
Command(command) => self.handle_command(command).await,
948948
TriggerShutdown(user_init_shutdown) => {
949-
self.trigger_shutdown(user_init_shutdown);
949+
self.on_trigger_shutdown(user_init_shutdown);
950950
should_stop = true;
951951
}
952952
NewAppVersionInfo(app_version_info) => {
@@ -2636,7 +2636,7 @@ where
26362636
}
26372637
}
26382638

2639-
fn trigger_shutdown(&mut self, user_init_shutdown: bool) {
2639+
fn on_trigger_shutdown(&mut self, user_init_shutdown: bool) {
26402640
// Block all traffic before shutting down to ensure that no traffic can leak on boot or
26412641
// shutdown.
26422642
if !user_init_shutdown
@@ -2665,8 +2665,7 @@ where
26652665
self.target_state.lock();
26662666

26672667
if shutdown {
2668-
self.state.shutdown(&self.tunnel_state);
2669-
self.disconnect_tunnel();
2668+
let _ = self.tx.send(InternalDaemonEvent::TriggerShutdown(false));
26702669
}
26712670
}
26722671

0 commit comments

Comments
 (0)