mirror of https://github.com/apache/activemq.git
Attempt to fix additional EOF problem
This commit is contained in:
parent
a6243225c5
commit
299410820e
|
@ -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));
|
||||||
|
|
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue