netty5/testsuite
Norman Maurer 48634f1466
Protect ChannelHandler from reentrancee issues (#9358)
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.
2019-09-03 10:28:08 +02:00
..
src/main/java/io/netty/testsuite Protect ChannelHandler from reentrancee issues (#9358) 2019-09-03 10:28:08 +02:00
.gitignore updated udt and connection test 2013-05-14 06:46:07 +02:00
pom.xml Use maven plugin to prevent API/ABI breakage as part of build process (#8904) 2019-03-01 19:48:29 +01:00