diff options
author | pacien | 2018-09-26 00:36:40 +0200 |
---|---|---|
committer | pacien | 2018-09-26 00:54:12 +0200 |
commit | b93bf5513a1c43ac11acef409c81dc7238324d69 (patch) | |
tree | 4fdd3479173c66022b095bc966d606c24a1d7d53 /app/src/main/java/org/pacien/tincapp/commands/Tinc.kt | |
parent | c9b813a2c8fcd53543c7aa84a773915d2c7c07d1 (diff) | |
download | tincapp-b93bf5513a1c43ac11acef409c81dc7238324d69.tar.gz |
Trigger tinc reconnection on network state change
Diffstat (limited to 'app/src/main/java/org/pacien/tincapp/commands/Tinc.kt')
-rw-r--r-- | app/src/main/java/org/pacien/tincapp/commands/Tinc.kt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/commands/Tinc.kt b/app/src/main/java/org/pacien/tincapp/commands/Tinc.kt index 4d00805..dc23935 100644 --- a/app/src/main/java/org/pacien/tincapp/commands/Tinc.kt +++ b/app/src/main/java/org/pacien/tincapp/commands/Tinc.kt | |||
@@ -34,6 +34,10 @@ object Tinc { | |||
34 | Executor.call(newCommand(netName).withArguments("stop")) | 34 | Executor.call(newCommand(netName).withArguments("stop")) |
35 | .thenApply { } | 35 | .thenApply { } |
36 | 36 | ||
37 | fun retry(netName: String): CompletableFuture<Unit> = | ||
38 | Executor.call(newCommand(netName).withArguments("retry")) | ||
39 | .thenApply { } | ||
40 | |||
37 | fun pid(netName: String): CompletableFuture<Int> = | 41 | fun pid(netName: String): CompletableFuture<Int> = |
38 | Executor.call(newCommand(netName).withArguments("pid")) | 42 | Executor.call(newCommand(netName).withArguments("pid")) |
39 | .thenApply { Integer.parseInt(it.first()) } | 43 | .thenApply { Integer.parseInt(it.first()) } |