Use correct object to synchronize on in DefaultChannelPipeline (#9171)
Motivation:
8e72071d76
did adjust how synchronization is done but missed to update one block and so used synchronized (this) while it should be synchronized (handlers) .
Modifications:
Use synchronized (handlers)
Result:
Correctly synchronize
This commit is contained in:
parent
1465e3ce06
commit
f81cd7d05b
@ -164,7 +164,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
|
||||
DefaultChannelHandlerContext newCtx = newContext(name, handler);
|
||||
EventExecutor executor = executor();
|
||||
boolean inEventLoop = executor.inEventLoop();
|
||||
synchronized (this) {
|
||||
synchronized (handlers) {
|
||||
if (context(name) != null) {
|
||||
throw new IllegalArgumentException("Duplicate handler name: " + name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user