Fix Flux.merge() concurrency limit in SubscribeChainStatus (#792)
This commit is contained in:
@@ -25,10 +25,9 @@ class SubscribeChainStatus(
|
||||
}
|
||||
|
||||
fun chainStatuses(): Flux<BlockchainOuterClass.SubscribeChainStatusResponse> {
|
||||
return Flux.merge(
|
||||
// we need to track not only multistreams with upstreams but all of them
|
||||
// because upstreams can be added in runtime with hot config reload
|
||||
multistreamHolder.all()
|
||||
val sources = multistreamHolder.all()
|
||||
.filter { Common.ChainRef.forNumber(it.getChain().id) != null }
|
||||
.map { ms ->
|
||||
Flux.concat(
|
||||
@@ -40,8 +39,9 @@ class SubscribeChainStatus(
|
||||
multistreamEvents(ms),
|
||||
),
|
||||
)
|
||||
},
|
||||
).doOnError {
|
||||
}
|
||||
return Flux.merge(Flux.fromIterable(sources), sources.size)
|
||||
.doOnError {
|
||||
log.error("Error during sending chain statuses", it)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user