Skip to content

Should ON_CONNECTION_STATE_CHANGE and ON_SUBSCRIPTION_ERROR be removed by removeAllListeners() if I want to re-initialise pusher connection? #182

@VictorAZ12

Description

@VictorAZ12

I'm using version 1.3.1. When I tried to reset the pusher singleton using reset(), I noticed that the connection state is not recovered. Then I tried calling cleanup directly:

        this.pusherEventEmitter.removeAllListeners('PusherReactNative:onConnectionStateChange');
        this.pusherEventEmitter.removeAllListeners('PusherReactNative:onSubscriptionError');

Somehow I was able to get pusher to reconnect and resubscribe correctly.
I will read the code and investigate further later just wonder if anyone has experienced this and if these two states are intentionally preserved, thanks for reading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions