48634f1466
Motivation: At the moment it is quite easy to hit reentrance issues when you have multiple handlers in the pipeline and each of the handlers does not correctly protect against these. To make it easier for the user we should try to protect from these. The issue is usually if and inbound event will trigger and outbound event and this outbound event then against triggeres an inbound event. This may result in having methods in a ChannelHandler re-enter some method and so state can be corrupted or messages be re-ordered. Modifications: - Keep track of inbound / outbound operations in DefaultChannelHandlerContext and if reentrancy is detected break it by scheduling the action on the EventLoop. This will then be picked up once the method returns and so the reentrancy is broken up. - Adjust tests which made strange assumptions about execution order Result: No more reentrancy of handlers possible. |
||
---|---|---|
.. | ||
src/main/java/io/netty/testsuite | ||
.gitignore | ||
pom.xml |