@@ -134,7 +134,7 @@ void openAsync(final Request request,
134
134
final boolean isSecure = Utils .isSecure (scheme );
135
135
endpoint = new AhcEndpoint (partitionId ,
136
136
isSecure , host , port , request .getLocalAddress (),
137
- createConnectorHandler ( isSecure , host ) );
137
+ defaultConnectionHandler );
138
138
139
139
endpointMap .put (partitionId , endpoint );
140
140
}
@@ -168,7 +168,7 @@ Connection openSync(final Request request)
168
168
if (endpoint == null ) {
169
169
endpoint = new AhcEndpoint (partitionId ,
170
170
isSecure , host , port , request .getLocalAddress (),
171
- createConnectorHandler ( isSecure , host ) );
171
+ defaultConnectionHandler );
172
172
173
173
endpointMap .put (partitionId , endpoint );
174
174
}
@@ -177,7 +177,7 @@ Connection openSync(final Request request)
177
177
178
178
if (c == null ) {
179
179
final Future <Connection > future =
180
- createConnectorHandler ( isSecure , host ) .connect (
180
+ defaultConnectionHandler .connect (
181
181
new InetSocketAddress (host , port ),
182
182
request .getLocalAddress () != null
183
183
? new InetSocketAddress (request .getLocalAddress (), 0 )
@@ -234,25 +234,6 @@ private static int getPort(final String scheme, final int p) {
234
234
return port ;
235
235
}
236
236
237
- private ConnectorHandler <SocketAddress > createConnectorHandler (
238
- final boolean isSecure , final String host ) {
239
-
240
- return isSecure && config .getHostnameVerifier () != null
241
- ? new TCPNIOConnectorHandler (transport ) {
242
-
243
- @ Override
244
- protected void preConfigure (final Connection connection ) {
245
- super .preConfigure (connection );
246
-
247
- HostnameVerifierListener .assignHostnameVerifyTask (
248
- connection , config .getHostnameVerifier (), host , null );
249
- }
250
-
251
- }
252
- : defaultConnectionHandler ;
253
-
254
- }
255
-
256
237
private class AhcEndpoint extends Endpoint <SocketAddress > {
257
238
258
239
private final String partitionId ;
0 commit comments