diff options
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r-- | src/org/traccar/BasePipelineFactory.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java index ed7aa0a69..615251d5f 100644 --- a/src/org/traccar/BasePipelineFactory.java +++ b/src/org/traccar/BasePipelineFactory.java @@ -132,9 +132,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { Context.getLocationProvider(), Context.getConfig().getBoolean("location.processInvalidPositions")); } - if (Context.getConfig().getBoolean("distance.enable")) { - distanceHandler = new DistanceHandler(); - } + distanceHandler = new DistanceHandler(); if (Context.getConfig().hasKey("location.latitudeHemisphere") || Context.getConfig().hasKey("location.longitudeHemisphere")) { @@ -181,9 +179,6 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { if (hemisphereHandler != null) { pipeline.addLast("hemisphere", hemisphereHandler); } - if (distanceHandler != null) { - pipeline.addLast("distance", distanceHandler); - } if (reverseGeocoderHandler != null) { pipeline.addLast("geocoder", reverseGeocoderHandler); } @@ -202,6 +197,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { pipeline.addLast("coordinatesHandler", coordinatesHandler); } + if (distanceHandler != null) { + pipeline.addLast("distance", distanceHandler); + } + if (Context.getDataManager() != null) { pipeline.addLast("dataHandler", new DefaultDataHandler()); } |