pladaria / reconnecting-websocket

Reconnecting WebSocket. For Web, React Native, cli (Node.js)
MIT License
1.22k stars 197 forks source link

Retry reconnect if connection timeouts while retrying (Should fix #48) #49

Closed kinsi55 closed 6 years ago

kinsi55 commented 6 years ago

I hardly ever work with Typescript so i hope this is correct :P

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-2.0%) to 96.5% when pulling b9a48b9a40de0c2e020f461baa59c98e7bbbc747 on kinsi55:master into 31a0f01af4c96dfb1ba0c17b1124de204cd0e513 on pladaria:master.

pladaria commented 6 years ago

Hi, can you please check the commented solution in #48?

kinsi55 commented 6 years ago

Is it fully compatible to the default WS implementation, as in, being a 1:1 replacible?

pladaria commented 6 years ago

@kinsi55 yes, it should. At least if you stick to the standard WebSocket API

kinsi55 commented 6 years ago

Alright, i'll give it a try later on (Im just going to assume that that would fix it pretty much). Possibly, if WS is incompatible you should error out if the user passes it, or alterantively ofc make it work with WS :D

kinsi55 commented 6 years ago

Forgot to get back. Yes using the html5-websocket module does work. Maybe native WS support should be a thing to consider.