Skip to content

Commit 300f9c9

Browse files
authored
#1830: dbindex support in redis (#1831)
1 parent a6d8f1c commit 300f9c9

File tree

1 file changed

+4
-2
lines changed
  • dubbo-registry/dubbo-registry-redis/src/main/java/com/alibaba/dubbo/registry/redis

1 file changed

+4
-2
lines changed

dubbo-registry/dubbo-registry-redis/src/main/java/com/alibaba/dubbo/registry/redis/RedisRegistry.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ public RedisRegistry(URL url) {
134134
}
135135
if (StringUtils.isEmpty(password)) {
136136
this.jedisPools.put(address, new JedisPool(config, host, port,
137-
url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT)));
137+
url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT), null,
138+
url.getParameter("db.index", 0)));
138139
} else {
139140
this.jedisPools.put(address, new JedisPool(config, host, port,
140-
url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT), password));
141+
url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT), password,
142+
url.getParameter("db.index", 0)));
141143
}
142144
}
143145

0 commit comments

Comments
 (0)