Hi, Trusting and awesome Mina Team,
How are you guys?
Well, today, when I was trying to test for the async calls, I (presumably)
found a bug when handling a continous data packet in
DecodingStateProtocolDecoder. (Against, Mina-2.0.0-M1,
DecodingStateProtocolDecoder.java:73)
for (;;) {
IoBuffer b = undecodedBuffers.peek();
if (b == null) {
break;
}
int oldRemaining = b.remaining();
state.decode(b, out);
int newRemaining = b.remaining();
if (newRemaining != 0) {
if (oldRemaining == newRemaining) {
throw new IllegalStateException(
DecodingState.class.getSimpleName() + " must " +
"consume at least one byte per decode().");
}
continue; // ### should be continue; instead of return;
} else {
undecodedBuffers.poll();
}
}
So, please review my patch.
Thanks, and keep up the great work!