Skip to content

Commit 8c2caa2

Browse files
author
Stephane Landelle
committed
Remove check about being in an IO thread
1 parent 48b67af commit 8c2caa2

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/Constants.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
public class Constants {
66

7-
// FIXME move into a state class along with closed
8-
public static final ThreadLocal<Boolean> IN_IO_THREAD = new ThreadLocalBoolean();
9-
107
// FIXME what to do with this???
118
public final static int MAX_BUFFERED_BYTES = 8192;
129

providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyChannelHandler.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ public NettyChannelHandler(AsyncHttpClientConfig config, NettyRequestSender requ
7777
@Override
7878
public void channelRead(final ChannelHandlerContext ctx, Object e) throws Exception {
7979

80-
Constants.IN_IO_THREAD.set(Boolean.TRUE);
81-
8280
Object attribute = Channels.getDefaultAttribute(ctx);
8381

8482
if (attribute instanceof Callback) {

providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/NettyRequestSender.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,8 @@ public <T> ListenableFuture<T> doConnect(final Request request, final AsyncHandl
218218
return cl.future();
219219
}
220220

221-
// FIXME when can we have a direct invokation???
222-
// boolean directInvokation = !(IN_IO_THREAD.get() &&
223-
// DefaultChannelFuture.isUseDeadLockChecker());
224-
boolean directInvokation = !Constants.IN_IO_THREAD.get();
225-
226221
// FIXME what does it have to do with the presence of a file?
227-
if (directInvokation && !asyncConnect && request.getFile() == null) {
222+
if (!asyncConnect && request.getFile() == null) {
228223
int timeOut = config.getConnectionTimeoutInMs() > 0 ? config.getConnectionTimeoutInMs() : Integer.MAX_VALUE;
229224
if (!channelFuture.awaitUninterruptibly(timeOut, TimeUnit.MILLISECONDS)) {
230225
if (acquiredConnection) {

0 commit comments

Comments
 (0)