diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2019-10-29 10:40:22 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2019-10-29 10:40:22 +0100 |
| commit | d137d003be9c0de3d3f416734c8be4ea7c9f74fe (patch) | |
| tree | afcd485d417a086971e0914c66952cbdb2f513b4 | |
| parent | f830849ef78f67bbd53765d3c26401f06b518425 (diff) | |
| download | mullvadvpn-d137d003be9c0de3d3f416734c8be4ea7c9f74fe.tar.xz mullvadvpn-d137d003be9c0de3d3f416734c8be4ea7c9f74fe.zip | |
Log if trying to gracefully close OpenVPN more than once
| -rw-r--r-- | talpid-core/src/process/openvpn.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/talpid-core/src/process/openvpn.rs b/talpid-core/src/process/openvpn.rs index cf9ef4e1ce..b1353834d3 100644 --- a/talpid-core/src/process/openvpn.rs +++ b/talpid-core/src/process/openvpn.rs @@ -388,7 +388,9 @@ impl StoppableProcess for OpenVpnProcHandle { fn stop(&self) { // Dropping our stdin handle so that it is closed once. Closing the handle should // gracefully stop our openvpn child process. - let _ = self.stdin.lock().take(); + if self.stdin.lock().take().is_none() { + log::warn!("Tried to close OpenVPN stdin handle twice, this is a bug"); + } } fn kill(&self) -> io::Result<()> { |
