diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/FilteredApis.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/FilteredApis.kt index 5f72e89b..d7a9a4eb 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/FilteredApis.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/FilteredApis.kt @@ -17,6 +17,7 @@ package io.emeraldpay.dshackle.upstream import io.emeraldpay.dshackle.Global +import io.emeraldpay.dshackle.SilentException import io.emeraldpay.dshackle.config.UpstreamsConfig import io.emeraldpay.grpc.Chain import io.micrometer.core.instrument.DistributionSummary @@ -156,6 +157,10 @@ class FilteredApis( } override fun subscribe(subscriber: Subscriber) { + if (allUpstreams.none { matcher.matches(it) }) { + Flux.empty().subscribe(subscriber) + return + } // initially try only standard upstreams val first = Flux.fromIterable(primaryUpstreams) val second = Flux.fromIterable(secondaryUpstreams)