Fix #1075: DefaultChannelHandlerContext.fireChannelSuspended and fireInboundBufferUpdated do not work correctly if handlers with EventExecutor are added or removed from pipeline.
This commit is contained in:
parent
08e2914cef
commit
273948055a
@ -912,8 +912,15 @@ final class DefaultChannelHandlerContext extends DefaultAttributeMap implements
|
|||||||
next.invokeInboundBufferUpdatedTask = task = new Runnable() {
|
next.invokeInboundBufferUpdatedTask = task = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!pipeline.isInboundShutdown()) {
|
if (pipeline.isInboundShutdown()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (findContextInbound() == next) {
|
||||||
next.invokeInboundBufferUpdated();
|
next.invokeInboundBufferUpdated();
|
||||||
|
} else {
|
||||||
|
// Pipeline changed since the task was submitted; try again.
|
||||||
|
fireInboundBufferUpdated0();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -968,7 +975,12 @@ final class DefaultChannelHandlerContext extends DefaultAttributeMap implements
|
|||||||
next.invokeChannelReadSuspendedTask = task = new Runnable() {
|
next.invokeChannelReadSuspendedTask = task = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
if (findContextInbound() == next) {
|
||||||
next.invokeChannelReadSuspended();
|
next.invokeChannelReadSuspended();
|
||||||
|
} else {
|
||||||
|
// Pipeline changed since the task was submitted; try again.
|
||||||
|
fireChannelReadSuspended();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user