aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index 6a1d3034f..3b52287b8 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -69,8 +69,13 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
} else {
msg.append(" < ");
}
-
- msg.append(((InetSocketAddress) event.getRemoteAddress()).getHostString()).append("]");
+
+ if (event.getRemoteAddress() != null) {
+ msg.append(((InetSocketAddress) event.getRemoteAddress()).getHostString());
+ } else {
+ msg.append("null");
+ }
+ msg.append("]");
if (event.getMessage() instanceof ChannelBuffer) {
msg.append(" HEX: ");