diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt index ab4806a09..ff04cf09a 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt @@ -168,7 +168,11 @@ private fun innerBufferExtractor(index: Int) = { s: Scannable -> } private val queueSubscriptionBufferExtractor = { s: Fuseable.QueueSubscription<*> -> - s.size.toDouble() + if (s != null) { + s.size.toDouble() + } else { + -1.0 + } } sealed class ParallelizableScheduler