@@ -129,7 +129,7 @@ private <T> ListenableFuture<T> sendRequestWithCertainForceConnect(//
129
129
130
130
NettyResponseFuture <T > newFuture = newNettyRequestAndResponseFuture (request , asyncHandler , future , uri , proxyServer , forceConnect );
131
131
132
- Channel channel = getCachedChannel (future , uri , request .getConnectionPoolKeyStrategy (), proxyServer );
132
+ Channel channel = getCachedChannel (future , uri , request .getConnectionPoolKeyStrategy (), proxyServer , asyncHandler );
133
133
134
134
if (Channels .isChannelValid (channel ))
135
135
return sendRequestWithCachedChannel (request , uri , proxyServer , newFuture , asyncHandler , channel );
@@ -153,7 +153,7 @@ private <T> ListenableFuture<T> sendRequestThroughSslProxy(//
153
153
154
154
NettyResponseFuture <T > newFuture = null ;
155
155
for (int i = 0 ; i < 3 ; i ++) {
156
- Channel channel = getCachedChannel (future , uri , request .getConnectionPoolKeyStrategy (), proxyServer );
156
+ Channel channel = getCachedChannel (future , uri , request .getConnectionPoolKeyStrategy (), proxyServer , asyncHandler );
157
157
if (Channels .isChannelValid (channel ))
158
158
if (newFuture == null )
159
159
newFuture = newNettyRequestAndResponseFuture (request , asyncHandler , future , uri , proxyServer , false );
@@ -184,12 +184,12 @@ private <T> NettyResponseFuture<T> newNettyRequestAndResponseFuture(final Reques
184
184
}
185
185
}
186
186
187
- private Channel getCachedChannel (NettyResponseFuture <?> future , UriComponents uri , ConnectionPoolKeyStrategy poolKeyGen , ProxyServer proxyServer ) {
187
+ private Channel getCachedChannel (NettyResponseFuture <?> future , UriComponents uri , ConnectionPoolKeyStrategy poolKeyGen , ProxyServer proxyServer , AsyncHandler <?> asyncHandler ) {
188
188
189
189
if (future != null && future .reuseChannel () && Channels .isChannelValid (future .channel ()))
190
190
return future .channel ();
191
191
else
192
- return pollAndVerifyCachedChannel (uri , proxyServer , poolKeyGen , future . getAsyncHandler () );
192
+ return pollAndVerifyCachedChannel (uri , proxyServer , poolKeyGen , asyncHandler );
193
193
}
194
194
195
195
private <T > ListenableFuture <T > sendRequestWithCachedChannel (Request request , UriComponents uri , ProxyServer proxy , NettyResponseFuture <T > future ,
0 commit comments