[#1388] Correctly break the loop on exceptions

This commit is contained in:
Norman Maurer 2013-05-23 17:17:21 +02:00
parent 50ac0cdfcb
commit 5398792ffa

View File

@ -84,16 +84,19 @@ public abstract class AbstractNioMessageChannel extends AbstractNioChannel {
} }
if (t instanceof IOException) { if (t instanceof IOException) {
closed = true; closed = true;
} else if (!closed) { } else if (!closed) {
firedChannelReadSuspended = true; firedChannelReadSuspended = true;
pipeline.fireChannelReadSuspended(); pipeline.fireChannelReadSuspended();
} }
pipeline().fireExceptionCaught(t); pipeline().fireExceptionCaught(t);
// break the loop now
break;
} finally { } finally {
if (read) { if (read) {
pipeline.fireInboundBufferUpdated(); pipeline.fireInboundBufferUpdated();
} }
if (closed && isOpen()) { if (closed && isOpen()) {
close(voidPromise()); close(voidPromise());