Skip to content

Commit e8a1ea1

Browse files
author
Stephane Landelle
committed
Notify Handshake failures, close AsyncHttpClient#767
1 parent ac65fe7 commit e8a1ea1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

providers/netty3/src/main/java/org/asynchttpclient/providers/netty3/request/NettyConnectListener.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,10 @@ public void operationComplete(ChannelFuture handshakeFuture) throws Exception {
115115

116116
writeRequest(channel, poolKey);
117117
} else {
118-
abortChannelPreemption(poolKey);
119-
future.abort(new ConnectException("HostnameVerifier exception"));
118+
onFutureFailure(channel, new ConnectException("HostnameVerifier exception"));
120119
}
120+
} else {
121+
onFutureFailure(channel, handshakeFuture.getCause());
121122
}
122123
}
123124
});

providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/request/NettyConnectListener.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,10 @@ public void operationComplete(Future<? super Channel> handshakeFuture) throws Ex
112112

113113
writeRequest(channel);
114114
} else {
115-
abortChannelPreemption(poolKey);
116-
future.abort(new ConnectException("HostnameVerifier exception"));
115+
onFutureFailure(channel, new ConnectException("HostnameVerifier exception"));
117116
}
117+
} else {
118+
onFutureFailure(channel, handshakeFuture.cause());
118119
}
119120
}
120121
});

0 commit comments

Comments
 (0)