diff --git a/src/main/java/org/logstash/beats/BeatsHandler.java b/src/main/java/org/logstash/beats/BeatsHandler.java index a2aa251c..755091ee 100644 --- a/src/main/java/org/logstash/beats/BeatsHandler.java +++ b/src/main/java/org/logstash/beats/BeatsHandler.java @@ -21,11 +21,11 @@ public BeatsHandler(IMessageListener listener) { @Override public void channelActive(final ChannelHandlerContext ctx) throws Exception { + context = ctx; if (logger.isTraceEnabled()){ logger.trace(format("Channel Active")); } super.channelActive(ctx); - context = ctx; messageListener.onNewConnection(ctx); }