angular-pusher
angular-pusher copied to clipboard
Get connection state and reconnect
I sometimes get this message when my connection is closed: WebSocket connection to '[pusher url...]' failed: WebSocket is closed before the connection is established.
.
It would be nice to have a method called isActive()
or isConnected()
to know about it and be able to reconnect.
Should this be exposed on the Service or just implemented inside the service to attempt auto reconnects?
In my app, I would like to track any disconnection and perform some logic if it happens. That why exposing a method would be ideal for me.
@mehl321 sorry for the long delay... does this commit help?