ObservableTunnel: Don't cache configAsync

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-03-30 11:25:44 +05:30 committed by Jason A. Donenfeld
parent c547d033c3
commit 3095e19e13

View File

@ -71,7 +71,8 @@ class ObservableTunnel internal constructor(
}
private set
val configAsync: CompletionStage<Config> = if (config == null)
val configAsync: CompletionStage<Config>
get() = if (config == null)
manager.getTunnelConfig(this)
else
CompletableFuture.completedFuture(config)