problem: calls gRPC upstream even if it's unavailable

This commit is contained in:
Igor Artamonov
2019-08-22 15:21:10 -04:00
parent 5dab6115b3
commit f8edcf5762

View File

@@ -147,7 +147,7 @@ open class GrpcUpstream(
} }
override fun isAvailable(matcher: Selector.Matcher): Boolean { override fun isAvailable(matcher: Selector.Matcher): Boolean {
return headBlock.get() != null && nodes.get().getNodes().any { return getStatus() == UpstreamAvailability.OK && headBlock.get() != null && nodes.get().getNodes().any {
it.quorum > 0 && matcher.matches(it.labels) it.quorum > 0 && matcher.matches(it.labels)
} }
} }