Do not wrap in square brackets already wrapped IPv6 addresses v2

There was already a fix b7df3a2d29

But it was lost in a9f7a99388 (diff-7d2da5068938564117bd318316bdd1ad)
pull/2300/head
AndreevDm 6 years ago committed by GitHub
parent fe4d444414
commit d677f49e7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -501,7 +501,7 @@ public class SentinelConnectionManager extends MasterSlaveConnectionManager {
if (host.contains(":")){
String pureHost = host.replaceAll("[\\[\\]]", "");
host = applyNatMap(pureHost);
if (host.contains(":")) {
if (host.contains(":") && !host.startsWith("[")) {
host = "[" + host + "]";
}
} else {

Loading…
Cancel
Save