aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2022-01-11 23:10:35 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2022-01-11 23:10:35 -0800
commit7b2e47a143a34cb97cb8b52c00081e36898db346 (patch)
tree5c2ab1efb003add2ab62324046f8b90908f6219b /src/main
parent847960abb40e37c598af082e96a742ca745a7ff5 (diff)
downloadtrackermap-server-7b2e47a143a34cb97cb8b52c00081e36898db346.tar.gz
trackermap-server-7b2e47a143a34cb97cb8b52c00081e36898db346.tar.bz2
trackermap-server-7b2e47a143a34cb97cb8b52c00081e36898db346.zip
Fix frame decoding
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/ArmoliProtocol.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/ArmoliProtocol.java b/src/main/java/org/traccar/protocol/ArmoliProtocol.java
index 2571690c2..1b8ce871c 100644
--- a/src/main/java/org/traccar/protocol/ArmoliProtocol.java
+++ b/src/main/java/org/traccar/protocol/ArmoliProtocol.java
@@ -15,10 +15,10 @@
*/
package org.traccar.protocol;
-import io.netty.handler.codec.LineBasedFrameDecoder;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
+import org.traccar.CharacterDelimiterFrameDecoder;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
@@ -28,7 +28,7 @@ public class ArmoliProtocol extends BaseProtocol {
addServer(new TrackerServer(false, getName()) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {
- pipeline.addLast(new LineBasedFrameDecoder(1024));
+ pipeline.addLast(new CharacterDelimiterFrameDecoder(1024, '\r'));
pipeline.addLast(new StringEncoder());
pipeline.addLast(new StringDecoder());
pipeline.addLast(new ArmoliProtocolDecoder(ArmoliProtocol.this));