Skip to content

Crash on unsubscribe from topic after ERROR is received #8

Open
@stairs

Description

@stairs

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions