aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index a11d4fcfd..3c309d224 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -255,6 +255,19 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
addProtocolHandlers(new PipelineBuilder() {
@Override
+ public void addLast(ChannelHandler handler) {
+ if (!(handler instanceof BaseProtocolDecoder || handler instanceof BaseProtocolEncoder)) {
+ if (handler instanceof ChannelInboundHandler) {
+ handler = new WrapperInboundHandler((ChannelInboundHandler) handler);
+ } else {
+ handler = new WrapperOutboundHandler((ChannelOutboundHandler) handler);
+ }
+ }
+ pipeline.addLast(handler);
+ }
+
+ // TODO remove
+ @Override
public void addLast(String name, ChannelHandler handler) {
if (!(handler instanceof BaseProtocolDecoder || handler instanceof BaseProtocolEncoder)) {
if (handler instanceof ChannelInboundHandler) {