diff options
| author | David Lönnhager <david.l@mullvad.net> | 2020-11-16 17:37:07 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2020-11-24 18:50:04 +0100 |
| commit | 4f78929be5845af02a45e51f21ce848ec5efa166 (patch) | |
| tree | 10aa35ee90cc3df64f64b9c70a64a62bb0cb357d /talpid-core/src | |
| parent | 11d0f4eef8b9e5cd3f071f18bc26e42305fc6f5d (diff) | |
| download | mullvadvpn-4f78929be5845af02a45e51f21ce848ec5efa166.tar.xz mullvadvpn-4f78929be5845af02a45e51f21ce848ec5efa166.zip | |
Bump openvpn-plugin crate
Diffstat (limited to 'talpid-core/src')
| -rw-r--r-- | talpid-core/src/tunnel/openvpn.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/talpid-core/src/tunnel/openvpn.rs b/talpid-core/src/tunnel/openvpn.rs index eab4add157..dcd2268772 100644 --- a/talpid-core/src/tunnel/openvpn.rs +++ b/talpid-core/src/tunnel/openvpn.rs @@ -724,6 +724,7 @@ mod event_server { use parity_tokio_ipc::{Endpoint as IpcEndpoint, SecurityAttributes}; use std::{ collections::HashMap, + convert::TryFrom, pin::Pin, task::{Context, Poll}, }; @@ -772,8 +773,10 @@ mod event_server { let request = request.into_inner(); - let event_type = openvpn_plugin::EventType::try_from(request.event) - .ok_or(tonic::Status::invalid_argument("Unknown event type"))?; + let event_type = + openvpn_plugin::EventType::try_from(request.event).map_err(|event: i32| { + tonic::Status::invalid_argument(format!("Unknown event type: {}", event)) + })?; (self.on_event)(event_type, request.env); |
