renew an InetSocketAddress to resolve address again

resolve [issue427](https://github.com/alibaba/otter/issues/427)
This commit is contained in:
whaon
2018-03-14 09:55:20 +08:00
committed by GitHub
parent 499be8bd8c
commit 256056e14f

View File

@@ -50,7 +50,10 @@ public class MysqlConnector {
}
public MysqlConnector(InetSocketAddress address, String username, String password){
this.address = address;
String addr = address.getHostString();
int port = address.getPort();
this.address = new InetSocketAddress(addr, port);
this.username = username;
this.password = password;
}