-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Copied from WyriHaximus/php-pusher-client#4 created by @davidwdan
Connection closure
Clients may close the WebSocket connection at any time.
The Pusher server may choose to close the WebSocket connection, in which case a close code and reason will be sent.
Clients SHOULD support the following 3 ranges
4000-4099: The connection SHOULD NOT be re-established unchanged.
4100-4199: The connection SHOULD be re-established after backing off. The back-off time SHOULD be at least 1 second in duration and MAY be exponential in nature on consecutive failures.
4200-4299: The connection SHOULD be re-established immediately.
https://pusher.com/docs/pusher_protocol
This can be implemented by converting the error messages into error observables and then using retryWhen
to set the back-off time.
I'll work on this when I get a chance.