diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-05-22 12:21:02 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-05-22 12:54:29 +0200 |
| commit | 1d9812d828c145625bcdfc1806b6052d54f71b5e (patch) | |
| tree | 8054965cb772d1d2d817774641192e75e0566095 | |
| parent | 36b670cb5c81469a7b518b6ca33f1287f6893bc7 (diff) | |
| download | mullvadvpn-1d9812d828c145625bcdfc1806b6052d54f71b5e.tar.xz mullvadvpn-1d9812d828c145625bcdfc1806b6052d54f71b5e.zip | |
Wait differently in ChildMonitor to stop panics
| -rw-r--r-- | talpid_core/src/process/monitor.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/talpid_core/src/process/monitor.rs b/talpid_core/src/process/monitor.rs index 6914d8d821..1568d80615 100644 --- a/talpid_core/src/process/monitor.rs +++ b/talpid_core/src/process/monitor.rs @@ -29,7 +29,9 @@ impl ChildMonitor { /// guaranteed to fire before this method returns. pub fn wait(&mut self) -> io::Result<&process::Output> { if let Some(thread) = self.thread.take() { - let _ = thread.join(); + if let Err(e) = thread.join() { + error!("Panic in the on_exit callback in ChildMonitor: {:?}", e); + } } self.child.wait() } @@ -44,7 +46,7 @@ impl ChildMonitor { impl Drop for ChildMonitor { fn drop(&mut self) { let _ = self.kill(); - let _ = self.wait(); + let _ = self.child.wait(); } } |
