[#1388] Correctly break the loop on exceptions
This commit is contained in:
parent
50ac0cdfcb
commit
5398792ffa
@ -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());
|
||||||
|
Loading…
Reference in New Issue
Block a user