File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
src/main/java/org/jboss/netty/channel Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -590,6 +590,10 @@ public void sendDownstream(ChannelEvent e) {
590590 }
591591
592592 void sendDownstream (DefaultChannelHandlerContext ctx , ChannelEvent e ) {
593+ if (e instanceof UpstreamMessageEvent ) {
594+ throw new IllegalArgumentException ("cannot send an upstream event to downstream" );
595+ }
596+
593597 try {
594598 ((ChannelDownstreamHandler ) ctx .getHandler ()).handleDownstream (ctx , e );
595599 } catch (Throwable t ) {
Original file line number Diff line number Diff line change @@ -407,6 +407,10 @@ public void sendDownstream(ChannelEvent e) {
407407 }
408408
409409 void sendDownstream (StaticChannelHandlerContext ctx , ChannelEvent e ) {
410+ if (e instanceof UpstreamMessageEvent ) {
411+ throw new IllegalArgumentException ("cannot send an upstream event to downstream" );
412+ }
413+
410414 try {
411415 ((ChannelDownstreamHandler ) ctx .getHandler ()).handleDownstream (ctx , e );
412416 } catch (Throwable t ) {
You can’t perform that action at this time.
0 commit comments