[#1159] Make sure we not produce an empty buffer on decodeLast(..)
This commit is contained in:
parent
afdac5611e
commit
33c988b129
|
@ -134,7 +134,11 @@ public class HttpClientCodec implements ChannelUpstreamHandler,
|
|||
protected Object decode(ChannelHandlerContext ctx, Channel channel,
|
||||
ChannelBuffer buffer, State state) throws Exception {
|
||||
if (done) {
|
||||
return buffer.readBytes(actualReadableBytes());
|
||||
int readable = actualReadableBytes();
|
||||
if (readable == 0) {
|
||||
return null;
|
||||
}
|
||||
return buffer.readBytes(readable);
|
||||
} else {
|
||||
Object msg = super.decode(ctx, channel, buffer, state);
|
||||
if (failOnMissingResponse) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user