When socket error is reported and we try to unsubscribe from the topic, IllegalStateException will be thrown as shown below:
@NonNull
@Override
public Completable send(String stompMessage) {
return Completable.fromCallable(() -> {
if (getSocket() == null) {
throw new IllegalStateException("Not connected yet");
} else {
Log.d(TAG, "Send STOMP message: " + stompMessage);
rawSend(stompMessage);
return null;
}
});
}
Could we maybe just check when unsubscribing if actual event should be sent based on sockets state?
When socket error is reported and we try to unsubscribe from the topic, IllegalStateException will be thrown as shown below:
Could we maybe just check when unsubscribing if actual event should be sent based on sockets state?