summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2020-07-20 10:49:45 +0100
committerEmīls <emils@mullvad.net>2020-07-29 12:24:41 +0100
commit8e4128169531cfd46e00b67b809ed4dac559a7d7 (patch)
tree4ba6f5017b683c9e734ee9a1adf7d8f65adbdba5
parent7c5b996b1d7ca1565641ca6e465c4ea8d7135461 (diff)
downloadmullvadvpn-8e4128169531cfd46e00b67b809ed4dac559a7d7.tar.xz
mullvadvpn-8e4128169531cfd46e00b67b809ed4dac559a7d7.zip
Block on futures in the daemon
-rw-r--r--mullvad-daemon/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs
index 997770f8de..5299601e40 100644
--- a/mullvad-daemon/src/lib.rs
+++ b/mullvad-daemon/src/lib.rs
@@ -972,6 +972,13 @@ where
self.rpc_runtime.runtime().spawn(fut);
}
+ fn block_on_future<F>(&mut self, fut: F) -> F::Output
+ where
+ F: std::future::Future,
+ {
+ self.rpc_runtime.runtime().block_on(fut)
+ }
+
fn handle_command(&mut self, command: DaemonCommand) {
use self::DaemonCommand::*;