reconnecting-websocket icon indicating copy to clipboard operation
reconnecting-websocket copied to clipboard

Provide timestamp of next connection attempt

Open remko opened this issue 7 years ago • 2 comments

I'd like to inform the user that there's a connectivity problem, and when the next attempt will be to restore the connection. To do that, I'd have to know when the websocket will attempt to reconnect (e.g. through a timestamp property on the ReconnectingWebSocket object that tells when the next connection attempt will be).

remko avatar Oct 23 '17 07:10 remko

Interesting. Maybe a better idea would be to accept via constructor a function getReconnectingDelay(retryNumber), so you can have full control of that.

Would that fit your needs?

pladaria avatar Oct 27 '17 07:10 pladaria

@pladaria It would solve my problem.

remko avatar Apr 04 '18 13:04 remko