From b93bf5513a1c43ac11acef409c81dc7238324d69 Mon Sep 17 00:00:00 2001 From: pacien Date: Wed, 26 Sep 2018 00:36:40 +0200 Subject: Trigger tinc reconnection on network state change --- app/src/main/java/org/pacien/tincapp/commands/Tinc.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/src/main/java/org/pacien/tincapp/commands/Tinc.kt') 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 { Executor.call(newCommand(netName).withArguments("stop")) .thenApply { } + fun retry(netName: String): CompletableFuture = + Executor.call(newCommand(netName).withArguments("retry")) + .thenApply { } + fun pid(netName: String): CompletableFuture = Executor.call(newCommand(netName).withArguments("pid")) .thenApply { Integer.parseInt(it.first()) } -- cgit v1.2.3