Skip to content

Commit d596056

Browse files
committed
Remove dead code, there's no way we could receive something else
1 parent 8caa0b8 commit d596056

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

Diff for: client/src/main/java/org/asynchttpclient/netty/handler/AsyncHttpClientHandler.java

+2-9
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,8 @@ public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exce
6767
Object attribute = Channels.getAttribute(channel);
6868

6969
try {
70-
if (attribute instanceof Callback) {
71-
Callback ac = (Callback) attribute;
72-
if (msg instanceof LastHttpContent) {
73-
ac.call();
74-
} else if (!(msg instanceof HttpContent)) {
75-
logger.info("Received unexpected message while expecting a chunk: " + msg);
76-
ac.call();
77-
Channels.setDiscard(channel);
78-
}
70+
if (attribute instanceof Callback && msg instanceof LastHttpContent) {
71+
((Callback) attribute).call();
7972

8073
} else if (attribute instanceof NettyResponseFuture) {
8174
NettyResponseFuture<?> future = (NettyResponseFuture<?>) attribute;

0 commit comments

Comments
 (0)