aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/ServerManager.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 46346f1c1..ab81caafd 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -224,9 +224,13 @@ public class ServerManager {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
- byte delimiter[] = { (byte) ';' };
- pipeline.addLast("frameDecoder",
- new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
+ byte delimiter1[] = { (byte) '\r', (byte) '\n' };
+ byte delimiter2[] = { (byte) '\n' };
+ byte delimiter3[] = { (byte) ';' };
+ pipeline.addLast("frameDecoder", new DelimiterBasedFrameDecoder(1024,
+ ChannelBuffers.wrappedBuffer(delimiter1),
+ ChannelBuffers.wrappedBuffer(delimiter2),
+ ChannelBuffers.wrappedBuffer(delimiter3)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("objectDecoder", new Gps103ProtocolDecoder(ServerManager.this));