diff options
Diffstat (limited to 'talpid-openvpn-plugin/src')
| -rw-r--r-- | talpid-openvpn-plugin/src/lib.rs | 4 | ||||
| -rw-r--r-- | talpid-openvpn-plugin/src/processing.rs | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/talpid-openvpn-plugin/src/lib.rs b/talpid-openvpn-plugin/src/lib.rs index 571991917d..2331278072 100644 --- a/talpid-openvpn-plugin/src/lib.rs +++ b/talpid-openvpn-plugin/src/lib.rs @@ -10,8 +10,10 @@ pub enum Error { #[error("No core server id given as first argument")] MissingCoreServerId, + // TODO: Remove box when upgrading tonic to a version with + // https://github.com/hyperium/tonic/pull/2282 #[error("Failed to send an event to daemon over the IPC channel")] - SendEvent(#[source] tonic::Status), + SendEvent(#[source] Box<tonic::Status>), #[error("Unable to start Tokio runtime")] CreateRuntime(#[source] io::Error), diff --git a/talpid-openvpn-plugin/src/processing.rs b/talpid-openvpn-plugin/src/processing.rs index cb2a422138..6a4bfced93 100644 --- a/talpid-openvpn-plugin/src/processing.rs +++ b/talpid-openvpn-plugin/src/processing.rs @@ -71,6 +71,9 @@ impl EventProcessor { .block_on(self.ipc_client.route_predown(details)), other => return Err(Error::UnhandledEvent(other)), }; - response.map(|_| ()).map_err(Error::SendEvent) + match response { + Ok(_) => Ok(()), + Err(e) => Err(Error::SendEvent(Box::new(e))), + } } } |
