Attempt to fix additional EOF problem
This commit is contained in:
Timothy Bish 2015-04-02 09:09:06 -04:00
parent a6243225c5
commit 299410820e
2 changed files with 6 additions and 6 deletions

View File

@ -76,11 +76,11 @@ class StompSocket extends TransportSupport implements WebSocket.OnTextMessage, S
try { try {
if (data != null) { if (data != null) {
if (data.startsWith("\n")) { if (data.equals("\n")) {
sendToActiveMQ(new KeepAliveInfo()); 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) { } catch (Exception e) {
onException(IOExceptionSupport.create(e)); onException(IOExceptionSupport.create(e));

View File

@ -136,11 +136,11 @@ class StompSocket extends TransportSupport implements WebSocketListener, StompTr
try { try {
if (data != null) { if (data != null) {
if (data.startsWith("\n")) { if (data.equals("\n")) {
sendToActiveMQ(new KeepAliveInfo()); 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) { } catch (Exception e) {
onException(IOExceptionSupport.create(e)); onException(IOExceptionSupport.create(e));