Skip to content

Commit 3a2eafe

Browse files
committed
Update blocking connection call. Remove timing from get() call as the pool implementation will take care of it for us.
1 parent d2f2d6f commit 3a2eafe

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/ConnectionManager.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ public void doTrackedConnection(final Request request,
101101
IOException ioe = null;
102102
GrizzlyFuture<Connection> future = connectionPool.take(key);
103103
try {
104-
final int connTimeout =
105-
provider.getClientConfig().getConnectionTimeoutInMs();
106-
connectHandler.completed(future.get(connTimeout, MILLISECONDS));
104+
// No explicit timeout when calling get() here as the Grizzly
105+
// endpoint pool will time it out based on the connect timeout
106+
// setting.
107+
connectHandler.completed(future.get());
107108
} catch (CancellationException e) {
108109
connectHandler.cancelled();
109110
} catch (ExecutionException ee) {

0 commit comments

Comments
 (0)