Fixed - host details in Redis url cause extra bracket at the end. #2370

pull/2382/head
Nikita Koksharov 5 years ago
parent 2e6de2ee1f
commit 082c0dccf8

@ -38,6 +38,9 @@ public class RedisURI {
String urlHost = uri.replaceFirst("redis://", "http://").replaceFirst("rediss://", "http://");
String ipV6Host = uri.substring(uri.indexOf("://")+3, uri.lastIndexOf(":"));
if (ipV6Host.contains("@")) {
ipV6Host = ipV6Host.split("@")[1];
}
if (ipV6Host.contains(":")) {
urlHost = urlHost.replace(ipV6Host, "[" + ipV6Host + "]");
}

Loading…
Cancel
Save