Skip to content
Browse files

Update transport/src/main/java/io/netty/channel/DefaultChannelPipelin…

…e.java

Report non @Shareable handler name that has been re-added.
  • Loading branch information...
1 parent 5d2b41c commit 3e7d270ce02d3ba1e14a27ed41f99623de3f9a2d @coltnz committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java
View
3 transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java
@@ -627,7 +627,8 @@ private static void callBeforeAdd(ChannelHandlerContext ctx) {
ChannelStateHandlerAdapter h = (ChannelStateHandlerAdapter) handler;
if (!h.isSharable() && h.added) {
throw new ChannelHandlerLifeCycleException(
- "Only a @Sharable handler can be added or removed multiple times.");
+ ctx.handler().getClass().getName() +
+ " is not a @Sharable handler, so can't be added or removed multiple times.");
}
h.added = true;
}

0 comments on commit 3e7d270

Please sign in to comment.
Something went wrong with that request. Please try again.