From 5656abb1fd722e3d1014abcd51f1b09e39f50589 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 17 Oct 2015 11:18:34 +1300 Subject: Handle missing remote address --- src/org/traccar/BasePipelineFactory.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java index 14041a63a..6a1d3034f 100644 --- a/src/org/traccar/BasePipelineFactory.java +++ b/src/org/traccar/BasePipelineFactory.java @@ -69,10 +69,9 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { } else { msg.append(" < "); } + + msg.append(((InetSocketAddress) event.getRemoteAddress()).getHostString()).append("]"); - msg.append(((InetSocketAddress) event.getRemoteAddress()).getAddress().getHostAddress()).append("]"); - - // Append hex message if (event.getMessage() instanceof ChannelBuffer) { msg.append(" HEX: "); msg.append(ChannelBuffers.hexDump((ChannelBuffer) event.getMessage())); -- cgit v1.2.3