From 0ba57eca2493aa4e54c1cbe2b7088a7c28c55404 Mon Sep 17 00:00:00 2001 From: mrniko <1104661+mrniko@users.noreply.github.com> Date: Wed, 22 Jan 2025 15:49:14 +0300 Subject: [PATCH] Feature - added regex setting to RandomLoadBalancer and RoundRobinLoadBalancer #108 --- .../java/org/redisson/connection/balancer/BaseLoadBalancer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redisson/src/main/java/org/redisson/connection/balancer/BaseLoadBalancer.java b/redisson/src/main/java/org/redisson/connection/balancer/BaseLoadBalancer.java index eadd78193..8b793f9ba 100644 --- a/redisson/src/main/java/org/redisson/connection/balancer/BaseLoadBalancer.java +++ b/redisson/src/main/java/org/redisson/connection/balancer/BaseLoadBalancer.java @@ -44,7 +44,7 @@ public abstract class BaseLoadBalancer implements LoadBalancer { return entries; } return entries.stream().filter(e -> - pattern.matcher(e.getClient().getAddr().getHostName()).matches()) + pattern.matcher(e.getClient().getAddr().getHostName() + ":" + e.getClient().getAddr().getPort()).matches()) .collect(Collectors.toList()); }