summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--talpid_core/src/process/monitor.rs5
-rw-r--r--talpid_core/src/process/openvpn.rs6
2 files changed, 6 insertions, 5 deletions
diff --git a/talpid_core/src/process/monitor.rs b/talpid_core/src/process/monitor.rs
index 09cf3bef82..bab2876e05 100644
--- a/talpid_core/src/process/monitor.rs
+++ b/talpid_core/src/process/monitor.rs
@@ -110,10 +110,11 @@ mod child_monitor_tests {
#[test]
fn callback_after_kill() {
let (child, rx) = spawn(&sleep_cmd(100000));
- // Make sure on_exit is not triggered now.
+ // Make sure on_exit is not triggered within the first second. It should not be called
+ // until we kill the process.
assert!(rx.recv_timeout(Duration::from_secs(1)).is_err());
child.kill().unwrap();
- assert!(!rx.recv().unwrap().unwrap().status.success());
+ assert!(!rx.recv_timeout(Duration::from_secs(10)).unwrap().unwrap().status.success());
}
}
diff --git a/talpid_core/src/process/openvpn.rs b/talpid_core/src/process/openvpn.rs
index 549ee026a1..d565b085a8 100644
--- a/talpid_core/src/process/openvpn.rs
+++ b/talpid_core/src/process/openvpn.rs
@@ -19,11 +19,11 @@ use talpid_ipc;
error_chain!{
errors {
- /// Error while communicating with the OpenVPN plugin
+ /// Error while communicating with the OpenVPN plugin.
PluginCommunicationError {
description("Error while communicating with the OpenVPN plugin")
}
- /// Error while trying to spawn OpenVPN process
+ /// Error while trying to spawn OpenVPN process.
ChildSpawnError {
description("Error while trying to spawn OpenVPN process")
}
@@ -128,7 +128,7 @@ fn write_argument(fmt: &mut fmt::Formatter, arg: &str) -> fmt::Result {
pub enum OpenVpnEvent {
/// An event from the plugin loaded into OpenVPN.
PluginEvent(talpid_ipc::Result<(openvpn_ffi::OpenVpnPluginEvent, HashMap<String, String>)>),
- /// The OpenVPN process exited. The bool indicates if the process exited cleanly.
+ /// The OpenVPN process exited. Containing the result of waiting for the process.
Shutdown(io::Result<process::ExitStatus>),
}