Skip to content

Commit 159b6b5

Browse files
author
Stephane Landelle
committed
comments
1 parent d61fb56 commit 159b6b5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/ChannelManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ public void upgradePipelineForWebSockets(ChannelPipeline pipeline) {
418418
public final Callback newDrainCallback(final NettyResponseFuture<?> future, final Channel channel, final boolean keepAlive, final String poolKey) {
419419

420420
return new Callback(future) {
421-
public void call() throws Exception {
421+
public void call() {
422422
tryToOfferChannelToPool(channel, keepAlive, poolKey);
423423
}
424424
};

providers/netty/src/main/java/org/asynchttpclient/providers/netty/handler/HttpProtocol.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ private boolean exitAfterHandling401(//
229229

230230
logger.debug("Sending authentication to {}", request.getUri());
231231
Callback callback = new Callback(future) {
232-
public void call() throws Exception {
232+
public void call() throws IOException {
233233
channelManager.drainChannel(channel, future);
234234
requestSender.sendNextRequest(nextRequest, future);
235235
}
@@ -240,6 +240,7 @@ public void call() throws Exception {
240240
// before executing the next request.
241241
Channels.setAttribute(channel, callback);
242242
else
243+
// call might crash with an IOException
243244
callback.call();
244245

245246
return true;
@@ -451,6 +452,7 @@ public void handle(final Channel channel, final NettyResponseFuture<?> future, f
451452
finishUpdate(future, channel, !last);
452453
}
453454
} catch (Exception t) {
455+
// e.g. an IOException when trying to open a connection and send the next request
454456
if (hasIOExceptionFilters//
455457
&& t instanceof IOException//
456458
&& requestSender.applyIoExceptionFiltersAndReplayRequest(future, IOException.class.cast(t), channel)) {

0 commit comments

Comments
 (0)