diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2019-12-04 10:40:05 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2019-12-04 12:15:57 +0100 |
| commit | 43725ca94a126da60885fbb751b90010b084c169 (patch) | |
| tree | a3e21966c44a01a62d9e7762a0c8ac03801183cd | |
| parent | 34ae839bfacb41f485916e661714397cbb0da4df (diff) | |
| download | mullvadvpn-43725ca94a126da60885fbb751b90010b084c169.tar.xz mullvadvpn-43725ca94a126da60885fbb751b90010b084c169.zip | |
Use simpler unbounded_send to send tunnel commands
Should likely fix problems with some messages from the
offline monitor being lost/wrong
| -rw-r--r-- | mullvad-daemon/src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs index e4398e9880..e78649ac63 100644 --- a/mullvad-daemon/src/lib.rs +++ b/mullvad-daemon/src/lib.rs @@ -27,7 +27,6 @@ use crate::management_interface::{ BoxFuture, ManagementInterfaceEventBroadcaster, ManagementInterfaceServer, }; use futures::{ - executor, future::{self, Executor}, sync::{mpsc::UnboundedSender, oneshot}, Future, @@ -1511,8 +1510,8 @@ where } fn send_tunnel_command(&mut self, command: TunnelCommand) { - let mut sink = executor::spawn(UnboundedSender::clone(&self.tunnel_command_tx)); - sink.wait_send(command) + self.tunnel_command_tx + .unbounded_send(command) .expect("Tunnel state machine has stopped"); } |
