Skip to content

Conversation

AlbertTitov
Copy link

Fix parsing messages of type ERROR from STOMP socket.

The exception is "StompClient: Error parsing message - java.util.NoSuchElementException"

There should be a check that we have two empty lines in the message.

…e - java.util.NoSuchElementException)

There should be a check that we have two empty lines in the message.
@@ -86,7 +86,9 @@ public static StompMessage from(@Nullable String data) {
headers.add(new StompHeader(matcher.group(1), matcher.group(2)));
}

reader.skip("\n\n");
if (reader.hasNext("\n\n")) {
reader.skip("\n\n")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing ;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants