[#1136] Fix possible IllegalBufferAccessException when remove itself from the pipeline
This commit is contained in:
parent
7b4c83b462
commit
fcd6becad9
@ -949,14 +949,16 @@ final class DefaultChannelHandlerContext extends DefaultAttributeMap implements
|
||||
} catch (Throwable t) {
|
||||
notifyHandlerException(t);
|
||||
} finally {
|
||||
if (handler instanceof ChannelInboundByteHandler && !pipeline.isInboundShutdown()) {
|
||||
try {
|
||||
((ChannelInboundByteHandler) handler).discardInboundReadBytes(this);
|
||||
} catch (Throwable t) {
|
||||
notifyHandlerException(t);
|
||||
if (!freed) {
|
||||
if (handler instanceof ChannelInboundByteHandler && !pipeline.isInboundShutdown()) {
|
||||
try {
|
||||
((ChannelInboundByteHandler) handler).discardInboundReadBytes(this);
|
||||
} catch (Throwable t) {
|
||||
notifyHandlerException(t);
|
||||
}
|
||||
}
|
||||
freeHandlerBuffersAfterRemoval();
|
||||
}
|
||||
freeHandlerBuffersAfterRemoval();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user