diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-28 15:58:12 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-28 16:26:22 -0600 |
commit | 870b2bf36d8fe170e114acd61cef82d15bb3d237 (patch) | |
tree | fe9a84b65fb252137a0ef37adbd6fba1bf06e4cc /ui | |
parent | 07b69be7bfa9aa59ffb1942c7793c0f358e5736a (diff) |
ObservableTunnel: do not cache stats
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui')
-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 00cbc5a0..99a46041 100644 --- a/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt +++ b/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt @@ -97,10 +97,11 @@ class ObservableTunnel internal constructor( } private set - val statisticsAsync: CompletionStage<Statistics> = if (statistics == null || statistics!!.isStale) - manager.getTunnelStatistics(this) - else - CompletableFuture.completedFuture(statistics) + val statisticsAsync: CompletionStage<Statistics> + get() = if (statistics == null || statistics!!.isStale) + manager.getTunnelStatistics(this) + else + CompletableFuture.completedFuture(statistics) fun onStatisticsChanged(statistics: Statistics?): Statistics? { this.statistics = statistics |