From 8ec83f683faca97b43c2878453b400835d6a19f6 Mon Sep 17 00:00:00 2001 From: Mygod Date: Thu, 25 Oct 2018 13:32:03 +0800 Subject: [PATCH] Log exit values on monitor failures --- .../main/java/be/mygod/vpnhotspot/net/monitor/IpMonitor.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/monitor/IpMonitor.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/monitor/IpMonitor.kt index 1f831b70..a45a9f1f 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/monitor/IpMonitor.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/monitor/IpMonitor.kt @@ -43,7 +43,9 @@ abstract class IpMonitor : Runnable { err.join() process.waitFor() val result = process.exitValue() - return result == 0 || result == 143 // SIGTERM + val success = result == 0 || result == 143 // SIGTERM + if (!success) Timber.e("Monitor process exited with $result") + return success } init {