Switching Decoders

mrochon mattrochon at gmail.com
Fri Jun 18 16:27:36 EDT 2010


I've not used the replace method in the pipeline but I do explicitly remove
handlers, and add new ones where they used to be at different times.

This works exactly as expected I would try that to see if it is a problem
with the replace().

One possibly suspect piece of code, in DefaultChannelPipeline the replace
method says:

boolean sameName = ctx.getName().equals(newName);
......

if (!sameName) {
     name2ctx.remove(ctx.getName());
     name2ctx.put(newName, newCtx);
}

Which could potentially mean if the names are the same it is not inserting
the new context into the context map.

I would test this with unique names, and also like I sad above, explicitly
removing the handler and adding a new one.
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Switching-Decoders-tp5194093p5196852.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list