aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BaseProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-10-24 14:10:00 +0400
committerAnton Tananaev <anton.tananaev@gmail.com>2018-10-24 14:10:00 +0400
commitd7f4e49f89a878008101b58eaa207f89068cabba (patch)
tree507c15da107559dea485f8b040ca1ccfce8cab57 /src/org/traccar/BaseProtocol.java
parent3a008c877056234e525587dbb339e5c950748b9a (diff)
downloadtrackermap-server-d7f4e49f89a878008101b58eaa207f89068cabba.tar.gz
trackermap-server-d7f4e49f89a878008101b58eaa207f89068cabba.tar.bz2
trackermap-server-d7f4e49f89a878008101b58eaa207f89068cabba.zip
Search unwrapped handlers by class
Diffstat (limited to 'src/org/traccar/BaseProtocol.java')
-rw-r--r--src/org/traccar/BaseProtocol.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/BaseProtocol.java b/src/org/traccar/BaseProtocol.java
index 4ece8f848..c0fd1e27f 100644
--- a/src/org/traccar/BaseProtocol.java
+++ b/src/org/traccar/BaseProtocol.java
@@ -93,7 +93,7 @@ public abstract class BaseProtocol implements Protocol {
activeDevice.write(command);
} else if (command.getType().equals(Command.TYPE_CUSTOM)) {
String data = command.getString(Command.KEY_DATA);
- if (activeDevice.getChannel().pipeline().get(StringEncoder.class) != null) {
+ if (BasePipelineFactory.getHandler(activeDevice.getChannel().pipeline(), StringEncoder.class) != null) {
activeDevice.write(data);
} else {
activeDevice.write(Unpooled.wrappedBuffer(DataConverter.parseHex(data)));