You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2015/04/02 15:10:21 UTC

activemq git commit: https://issues.apache.org/jira/browse/AMQ-5155

Repository: activemq
Updated Branches:
  refs/heads/master a6243225c -> 299410820


https://issues.apache.org/jira/browse/AMQ-5155

Attempt to fix additional EOF problem 

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/29941082
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/29941082
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/29941082

Branch: refs/heads/master
Commit: 299410820e92797abbf00db5c97827d37d1c2052
Parents: a624322
Author: Timothy Bish <ta...@gmail.com>
Authored: Thu Apr 2 09:09:06 2015 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Thu Apr 2 09:10:08 2015 -0400

----------------------------------------------------------------------
 .../org/apache/activemq/transport/ws/jetty8/StompSocket.java   | 6 +++---
 .../org/apache/activemq/transport/ws/jetty9/StompSocket.java   | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/29941082/activemq-http/src/main/java/org/apache/activemq/transport/ws/jetty8/StompSocket.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/ws/jetty8/StompSocket.java b/activemq-http/src/main/java/org/apache/activemq/transport/ws/jetty8/StompSocket.java
index fb1c8d4..39cf0db 100644
--- a/activemq-http/src/main/java/org/apache/activemq/transport/ws/jetty8/StompSocket.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/ws/jetty8/StompSocket.java
@@ -76,11 +76,11 @@ class StompSocket extends TransportSupport implements WebSocket.OnTextMessage, S
 
         try {
             if (data != null) {
-                if (data.startsWith("\n")) {
+                if (data.equals("\n")) {
                     sendToActiveMQ(new KeepAliveInfo());
+                } else {
+                    protocolConverter.onStompCommand((StompFrame)wireFormat.unmarshal(new ByteSequence(data.getBytes("UTF-8"))));
                 }
-
-                protocolConverter.onStompCommand((StompFrame)wireFormat.unmarshal(new ByteSequence(data.getBytes("UTF-8"))));
             }
         } catch (Exception e) {
             onException(IOExceptionSupport.create(e));

http://git-wip-us.apache.org/repos/asf/activemq/blob/29941082/activemq-http/src/main/java/org/apache/activemq/transport/ws/jetty9/StompSocket.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/ws/jetty9/StompSocket.java b/activemq-http/src/main/java/org/apache/activemq/transport/ws/jetty9/StompSocket.java
index 3b04677..8969b56 100644
--- a/activemq-http/src/main/java/org/apache/activemq/transport/ws/jetty9/StompSocket.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/ws/jetty9/StompSocket.java
@@ -136,11 +136,11 @@ class StompSocket extends TransportSupport implements WebSocketListener, StompTr
 
         try {
             if (data != null) {
-                if (data.startsWith("\n")) {
+                if (data.equals("\n")) {
                     sendToActiveMQ(new KeepAliveInfo());
+                } else {
+                    protocolConverter.onStompCommand((StompFrame)wireFormat.unmarshal(new ByteSequence(data.getBytes("UTF-8"))));
                 }
-
-                protocolConverter.onStompCommand((StompFrame)wireFormat.unmarshal(new ByteSequence(data.getBytes("UTF-8"))));
             }
         } catch (Exception e) {
             onException(IOExceptionSupport.create(e));