aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/MainEventHandler.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-03 11:46:55 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-03 11:46:55 +1200
commitf0d1a5df7aecf1237609200d3ecb7cdd3d0abcab (patch)
treec82ad82bdb77e0e33340d6a020dc0912448f60d8 /src/org/traccar/MainEventHandler.java
parent06e3bd8b16da12baafc9a97ba5949b3f7ffb5e07 (diff)
downloadtrackermap-server-f0d1a5df7aecf1237609200d3ecb7cdd3d0abcab.tar.gz
trackermap-server-f0d1a5df7aecf1237609200d3ecb7cdd3d0abcab.tar.bz2
trackermap-server-f0d1a5df7aecf1237609200d3ecb7cdd3d0abcab.zip
Properly handle datagram channels
Diffstat (limited to 'src/org/traccar/MainEventHandler.java')
-rw-r--r--src/org/traccar/MainEventHandler.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/MainEventHandler.java b/src/org/traccar/MainEventHandler.java
index 21b917a2d..49694aaff 100644
--- a/src/org/traccar/MainEventHandler.java
+++ b/src/org/traccar/MainEventHandler.java
@@ -18,11 +18,11 @@ package org.traccar;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
+import io.netty.channel.socket.DatagramChannel;
import io.netty.handler.timeout.IdleStateEvent;
import org.traccar.helper.Log;
import org.traccar.model.Position;
-import java.nio.channels.DatagramChannel;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
@@ -101,7 +101,7 @@ public class MainEventHandler extends ChannelInboundHandlerAdapter {
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
- Log.warning(formatChannel(ctx.channel()) + " error", cause.getCause());
+ Log.warning(formatChannel(ctx.channel()) + " error", cause);
closeChannel(ctx.channel());
}