File tree 1 file changed +1
-10
lines changed
alloydb-jdbc-connector/src/main/java/com/google/cloud/alloydb
1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -108,23 +108,14 @@ Socket connect() throws IOException {
108
108
"Instance does not have an address matching type: %s" , connectionConfig .getIpType ()));
109
109
}
110
110
111
- // Use the instance's address as a HostName.
112
- String serverName = address ;
113
- // TODO: use the correct address as server name once PSC DNS is populated
114
- // in all existing clusters. When that happens, delete this if statement.
115
- // https://github.com/GoogleCloudPlatform/alloydb-java-connector/issues/499
116
- if (connectionConfig .getIpType ().equals (IpType .PSC )) {
117
- serverName = connectionInfo .getIpAddress ();
118
- }
119
-
120
111
logger .debug (String .format ("[%s] Connecting to instance." , address ));
121
112
122
113
SSLParameters sslParameters = socket .getSSLParameters ();
123
114
// Set HTTPS as the the endpoint identification algorithm
124
115
// in order to verify the identity of the certificate as
125
116
// suggested at https://stackoverflow.com/a/17979954/927514
126
117
sslParameters .setEndpointIdentificationAlgorithm ("HTTPS" );
127
- sslParameters .setServerNames (Collections .singletonList (new SNIHostName (serverName )));
118
+ sslParameters .setServerNames (Collections .singletonList (new SNIHostName (address )));
128
119
129
120
socket .setSSLParameters (sslParameters );
130
121
socket .setKeepAlive (true );
You can’t perform that action at this time.
0 commit comments