diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2020-03-30 11:25:44 +0530 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-30 03:23:32 -0600 |
commit | 3095e19e13e282771caf69627bc43310b8e8462c (patch) | |
tree | 766b3cdefa1d725db9d6d5aec93ff53a4a5fb080 /ui/src/main | |
parent | c547d033c35b7b8150c5bad6dae1bad91fa08bcc (diff) |
ObservableTunnel: Don't cache configAsync
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'ui/src/main')
-rw-r--r-- | ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt b/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt index 99a46041..d5645e61 100644 --- a/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt +++ b/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt @@ -71,10 +71,11 @@ class ObservableTunnel internal constructor( } private set - val configAsync: CompletionStage<Config> = if (config == null) - manager.getTunnelConfig(this) - else - CompletableFuture.completedFuture(config) + val configAsync: CompletionStage<Config> + get() = if (config == null) + manager.getTunnelConfig(this) + else + CompletableFuture.completedFuture(config) fun setConfigAsync(config: Config): CompletionStage<Config> = if (config != this.config) manager.setTunnelConfig(this, config) |