diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2019-04-11 11:32:04 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2019-04-11 12:37:11 +0200 |
| commit | 1f2f2df0f3dfe8ff840251e18a0fd53c0d2c6a7a (patch) | |
| tree | c2d3922bc0e53467f80612855c90f21f926cb906 | |
| parent | 88bfa8816694247b3c694c520415a53b25030913 (diff) | |
| download | mullvadvpn-1f2f2df0f3dfe8ff840251e18a0fd53c0d2c6a7a.tar.xz mullvadvpn-1f2f2df0f3dfe8ff840251e18a0fd53c0d2c6a7a.zip | |
Change panic into error in mullvad-ipc-client
| -rw-r--r-- | mullvad-ipc-client/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mullvad-ipc-client/src/lib.rs b/mullvad-ipc-client/src/lib.rs index c1a205a44f..22c0b0d707 100644 --- a/mullvad-ipc-client/src/lib.rs +++ b/mullvad-ipc-client/src/lib.rs @@ -57,16 +57,16 @@ pub fn new_standalone_transport< } }); - rx.wait().expect("No transport handles returned").map( - |(rpc_client, server_handle, executor)| { + rx.wait() + .map_err(|_| io::Error::new(io::ErrorKind::NotFound, "No transport handles returned"))? + .map(|(rpc_client, server_handle, executor)| { let subscriber = jsonrpc_client_pubsub::Subscriber::new(executor, rpc_client.clone(), server_handle); DaemonRpcClient { rpc_client, subscriber, } - }, - ) + }) } fn spawn_transport< |
