Skip to content

Commit e5f07c2

Browse files
committed
Handled/Prevented the crash caused by an OnErrorNotImplementedException which itself was caused by a NoSuchElementException when parsing stomp messages.
1 parent e71248f commit e5f07c2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/src/main/java/ua/naiksoftware/stomp/StompClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ public void connect(@Nullable List<StompHeader> _headers) {
143143
.filter(msg -> msg.getStompCommand().equals(StompCommand.CONNECTED))
144144
.subscribe(stompMessage -> {
145145
getConnectionStream().onNext(true);
146+
}, onError -> {
147+
Log.e(TAG, "Error parsing message", onError);
146148
});
147149
}
148150

0 commit comments

Comments
 (0)