aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2018-02-17 13:47:28 +0100
committerpacien2018-02-17 13:47:28 +0100
commitc29970d29bd3c4831fc2f80077d1d8548ed0fc15 (patch)
tree424f155e666edadb6345f8809efcbb1951023618
parent000b7459192ea4f801e204eabbf19107a3ac2c60 (diff)
downloadtincapp-c29970d29bd3c4831fc2f80077d1d8548ed0fc15.tar.gz
Close copied private keys file descriptors
-rw-r--r--app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt b/app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt
index 0937006..dfdbb32 100644
--- a/app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt
+++ b/app/src/main/java/org/pacien/tincapp/service/TincVpnService.kt
@@ -96,6 +96,8 @@ class TincVpnService : VpnService() {
96 setState(netName, interfaceCfg, deviceFd, daemon) 96 setState(netName, interfaceCfg, deviceFd, daemon)
97 waitForDaemonStartup().thenRun { 97 waitForDaemonStartup().thenRun {
98 deviceFd.close() 98 deviceFd.close()
99 privateKeys.first?.close()
100 privateKeys.second?.close()
99 Log.i(TAG, "tinc daemon started.") 101 Log.i(TAG, "tinc daemon started.")
100 broadcastEvent(Actions.EVENT_CONNECTED) 102 broadcastEvent(Actions.EVENT_CONNECTED)
101 } 103 }