From 640e3ceee5218ec1ad417fbf279ffc5a2dddac6e Mon Sep 17 00:00:00 2001 From: Carter Kozak Date: Wed, 23 Aug 2017 17:41:00 -0400 Subject: [PATCH] HttpClientConnection catches failures more broadly In some (likely failure) cases I've noticed the undertow client fails to execute any ClientCallback methods. I've noticed NPEs in the the logs from SslConduit.doUnwrap, so it's possible this is caused by UNDERTOW-1156. --- .../client/http/HttpClientConnection.java | 23 +++++++++++-------- .../io/undertow/util/ConnectionUtils.java | 4 ++-- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/core/src/main/java/io/undertow/client/http/HttpClientConnection.java b/core/src/main/java/io/undertow/client/http/HttpClientConnection.java index 26d3bd7f74..77f15a8755 100644 --- a/core/src/main/java/io/undertow/client/http/HttpClientConnection.java +++ b/core/src/main/java/io/undertow/client/http/HttpClientConnection.java @@ -126,7 +126,6 @@ public void handleEvent(StreamSourceConduit channel) { private static final int UPGRADE_REQUESTED = 1 << 29; private static final int CLOSE_REQ = 1 << 30; private static final int CLOSED = 1 << 31; - private int count = 0; private int state; private final ChannelListener.SimpleSetter closeSetter = new ChannelListener.SimpleSetter<>(); @@ -331,7 +330,6 @@ public void sendRequest(final ClientRequest request, final ClientCallback