From 1b5b1f47324c2efdef022c6f86cc36cb526267b3 Mon Sep 17 00:00:00 2001 From: a10zn8 Date: Thu, 22 Jun 2023 14:56:01 +0300 Subject: [PATCH] revert after review --- .../kotlin/io/emeraldpay/dshackle/upstream/Multistream.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/Multistream.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/Multistream.kt index d93a152b..d436c57e 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/Multistream.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/Multistream.kt @@ -263,12 +263,12 @@ abstract class Multistream( } override fun start() { - val repeated = Flux.interval(Duration.ofSeconds(3)) + val repeated = Flux.interval(Duration.ofSeconds(30)) val whenChanged = observeStatus() .distinctUntilChanged() subscription = Flux.merge(repeated, whenChanged) // print status _change_ every 15 seconds, at most; otherwise prints it on interval of 30 seconds - .sample(Duration.ofSeconds(3)) + .sample(Duration.ofSeconds(15)) .subscribe { printStatus() } observeUpstreamsStatuses()