Made sure life cycle handlers are called only when the pipeline is attached to a channel

This commit is contained in:
Trustin Lee 2008-12-03 07:19:18 +00:00
parent f6b23a000b
commit bb137dd5ec

View File

@ -344,6 +344,10 @@ public class DefaultChannelPipeline implements ChannelPipeline {
return;
}
if (!isAttached()) {
return;
}
LifeCycleAwareChannelHandler h =
(LifeCycleAwareChannelHandler) ctx.getHandler();
@ -361,6 +365,10 @@ public class DefaultChannelPipeline implements ChannelPipeline {
return;
}
if (!isAttached()) {
return;
}
LifeCycleAwareChannelHandler h =
(LifeCycleAwareChannelHandler) ctx.getHandler();
@ -392,6 +400,10 @@ public class DefaultChannelPipeline implements ChannelPipeline {
return;
}
if (!isAttached()) {
return;
}
LifeCycleAwareChannelHandler h =
(LifeCycleAwareChannelHandler) ctx.getHandler();
@ -409,6 +421,10 @@ public class DefaultChannelPipeline implements ChannelPipeline {
return;
}
if (!isAttached()) {
return;
}
LifeCycleAwareChannelHandler h =
(LifeCycleAwareChannelHandler) ctx.getHandler();