ObservableTunnel: do not cache stats
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
07b69be7bf
commit
870b2bf36d
@ -97,10 +97,11 @@ class ObservableTunnel internal constructor(
|
|||||||
}
|
}
|
||||||
private set
|
private set
|
||||||
|
|
||||||
val statisticsAsync: CompletionStage<Statistics> = if (statistics == null || statistics!!.isStale)
|
val statisticsAsync: CompletionStage<Statistics>
|
||||||
manager.getTunnelStatistics(this)
|
get() = if (statistics == null || statistics!!.isStale)
|
||||||
else
|
manager.getTunnelStatistics(this)
|
||||||
CompletableFuture.completedFuture(statistics)
|
else
|
||||||
|
CompletableFuture.completedFuture(statistics)
|
||||||
|
|
||||||
fun onStatisticsChanged(statistics: Statistics?): Statistics? {
|
fun onStatisticsChanged(statistics: Statistics?): Statistics? {
|
||||||
this.statistics = statistics
|
this.statistics = statistics
|
||||||
|
Loading…
Reference in New Issue
Block a user