Skip to content

Commit e288c98

Browse files
committed
minor clean up
1 parent 7035a13 commit e288c98

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

client/src/main/java/org/asynchttpclient/netty/channel/NettyConnectListener.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,10 @@ public NettyConnectListener(NettyResponseFuture<T> future,//
6060
this.partitionKey = partitionKey;
6161
}
6262

63-
private void abortChannelPreemption(Channel channel) {
64-
Channels.silentlyCloseChannel(channel);
65-
}
66-
6763
private boolean futureIsAlreadyCancelled(Channel channel) {
6864
// FIXME should we only check isCancelled?
6965
if (future.isDone()) {
70-
abortChannelPreemption(channel);
66+
Channels.silentlyCloseChannel(channel);
7167
return true;
7268
}
7369
return false;
@@ -180,7 +176,7 @@ protected void onFailure(Throwable cause) throws Exception {
180176
public void onFailure(Channel channel, Throwable cause) {
181177

182178
// beware, channel can be null
183-
abortChannelPreemption(channel);
179+
Channels.silentlyCloseChannel(channel);
184180

185181
boolean canRetry = future.incrementRetryAndCheck();
186182
LOGGER.debug("Trying to recover from failing to connect channel {} with a retry value of {} ", channel, canRetry);

0 commit comments

Comments
 (0)