From 0f9b8b01b91c2ca14de9d95723d6efe53dc09be0 Mon Sep 17 00:00:00 2001 From: KirillPamPam Date: Thu, 21 Sep 2023 15:20:16 +0400 Subject: [PATCH] Always add override labels (#305) --- .../emeraldpay/dshackle/upstream/grpc/GrpcUpstreamStatus.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/grpc/GrpcUpstreamStatus.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/grpc/GrpcUpstreamStatus.kt index 2b2695970..4a71b5259 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/grpc/GrpcUpstreamStatus.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/grpc/GrpcUpstreamStatus.kt @@ -53,6 +53,10 @@ class GrpcUpstreamStatus( updateLabels.add(labels) } + if (updateLabels.isEmpty()) { + overrideLabels?.let { updateLabels.add(it) } + } + this.nodes.set(updateNodes) val labelsChanged = updateLabels != this.allLabels.get().toList() this.allLabels.set(Collections.unmodifiableCollection(updateLabels))