summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-09-11 13:58:33 +0200
committerAndrej Mihajlov <and@mullvad.net>2018-09-13 12:45:33 +0300
commit049a232c5311f1ea86b3f6441f54fbf064220273 (patch)
tree5f69d96c98671ba4ccfd200a1a5ea8820ae93ece
parent2e1ea49208946715b7e04693142ce102e9e36355 (diff)
downloadmullvadvpn-049a232c5311f1ea86b3f6441f54fbf064220273.tar.xz
mullvadvpn-049a232c5311f1ea86b3f6441f54fbf064220273.zip
Fix so on_update_relay_settings broadcasts new settings
-rw-r--r--mullvad-daemon/src/main.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/mullvad-daemon/src/main.rs b/mullvad-daemon/src/main.rs
index 1bcdeb8dd2..83d0e962af 100644
--- a/mullvad-daemon/src/main.rs
+++ b/mullvad-daemon/src/main.rs
@@ -478,10 +478,11 @@ impl Daemon {
fn on_update_relay_settings(&mut self, tx: OneshotSender<()>, update: RelaySettingsUpdate) {
let save_result = self.settings.update_relay_settings(update);
match save_result.chain_err(|| "Unable to save settings") {
- Ok(changed) => {
+ Ok(settings_changed) => {
Self::oneshot_send(tx, (), "update_relay_settings response");
-
- if changed {
+ if settings_changed {
+ self.management_interface_broadcaster
+ .notify_settings(&self.settings);
info!("Initiating tunnel restart because the relay settings changed");
self.reconnect_tunnel();
}
@@ -498,12 +499,12 @@ impl Daemon {
let save_result = self.settings.set_allow_lan(allow_lan);
match save_result.chain_err(|| "Unable to save settings") {
Ok(settings_changed) => {
+ Self::oneshot_send(tx, (), "set_allow_lan response");
if settings_changed {
self.management_interface_broadcaster
.notify_settings(&self.settings);
self.send_tunnel_command(TunnelCommand::AllowLan(allow_lan));
}
- Self::oneshot_send(tx, (), "set_allow_lan response");
}
Err(e) => error!("{}", e.display_chain()),
}