diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-05-05 10:30:06 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-05-05 12:58:17 +0200 |
| commit | cb03c311aefbb705b93eebe80456aa8a906690ff (patch) | |
| tree | e9514734cc2e8dc6b574f02d5246c805945e0c49 | |
| parent | e33d9f9c53dd8a60944407a3e34cb4479539420f (diff) | |
| download | mullvadvpn-cb03c311aefbb705b93eebe80456aa8a906690ff.tar.xz mullvadvpn-cb03c311aefbb705b93eebe80456aa8a906690ff.zip | |
Update doc strings, comments and test clarity
| -rw-r--r-- | talpid_core/src/process/monitor.rs | 5 | ||||
| -rw-r--r-- | talpid_core/src/process/openvpn.rs | 6 |
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>), } |
