From f7311567a022dcdfb00126b4931a485a8afdb134 Mon Sep 17 00:00:00 2001 From: Hiram Chirino Date: Wed, 30 Oct 2013 13:55:55 -0400 Subject: [PATCH] Fixes https://issues.apache.org/jira/browse/AMQ-4840 - Invalid STOMP frame sent on websocket connections with heartbeats. --- .../java/org/apache/activemq/transport/stomp/StompFrame.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java b/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java index 0a9fad97d6..0b2c0004f8 100644 --- a/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java +++ b/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/StompFrame.java @@ -182,6 +182,9 @@ public class StompFrame implements Command { } public String format(boolean forLogging) { + if( !forLogging && getAction().equals(Stomp.Commands.KEEPALIVE) ) { + return "\n"; + } StringBuilder buffer = new StringBuilder(); buffer.append(getAction()); buffer.append("\n");