Skip to content

Commit 65f4c55

Browse files
committed
minor clean: newExecuteNextRequestCallback could be private
1 parent 28b5127 commit 65f4c55

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -525,17 +525,12 @@ public boolean isClosed() {
525525
return clientState.isClosed();
526526
}
527527

528-
public final Callback newExecuteNextRequestCallback(final NettyResponseFuture<?> future, final Request nextRequest) {
529-
530-
return new Callback(future) {
528+
public void drainChannelAndExecuteNextRequest(final Channel channel, final NettyResponseFuture<?> future, Request nextRequest) {
529+
Channels.setAttribute(channel, new Callback(future) {
531530
@Override
532531
public void call() {
533532
sendNextRequest(nextRequest, future);
534533
}
535-
};
536-
}
537-
538-
public void drainChannelAndExecuteNextRequest(final Channel channel, final NettyResponseFuture<?> future, Request nextRequest) {
539-
Channels.setAttribute(channel, newExecuteNextRequestCallback(future, nextRequest));
534+
});
540535
}
541536
}

0 commit comments

Comments
 (0)