diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-03-08 01:00:49 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-03-09 10:44:48 -0300 |
| commit | 71aeea4f316b560ab2f7f4d8c1aa411cd16e1730 (patch) | |
| tree | 702190d62a896818af3e1ef4f275620f1164de27 | |
| parent | 4d70d7aadb4581ce893c61b84c663105d33d4cdd (diff) | |
| download | mullvadvpn-71aeea4f316b560ab2f7f4d8c1aa411cd16e1730.tar.xz mullvadvpn-71aeea4f316b560ab2f7f4d8c1aa411cd16e1730.zip | |
Check for other daemon sooner during start-up
| -rw-r--r-- | mullvad-daemon/src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mullvad-daemon/src/main.rs b/mullvad-daemon/src/main.rs index 2f3c25598b..231a6ebcf9 100644 --- a/mullvad-daemon/src/main.rs +++ b/mullvad-daemon/src/main.rs @@ -211,6 +211,11 @@ impl Daemon { resource_dir: PathBuf, require_auth: bool, ) -> Result<Self> { + ensure!( + !rpc_uniqueness_check::is_another_instance_running(), + ErrorKind::DaemonIsAlreadyRunning + ); + let (rpc_handle, http_handle, tokio_remote) = mullvad_rpc::event_loop::create(|core| { let handle = core.handle(); @@ -288,11 +293,6 @@ impl Daemon { event_tx: IntoSender<TunnelCommand, DaemonEvent>, require_auth: bool, ) -> Result<ManagementInterfaceServer> { - ensure!( - !rpc_uniqueness_check::is_another_instance_running(), - ErrorKind::DaemonIsAlreadyRunning - ); - let shared_secret = if require_auth { Some(uuid::Uuid::new_v4().to_string()) } else { |
