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

Doesn't reconnect

Open Kav91 opened this issue 8 years ago • 3 comments

Using react 15.x

If my server running the websocket is disconnected, it doesn't attempt to reconnect at all. With debug mode on, the last message is just Websocket disconnected.

Any ideas?

Kav91 avatar Oct 25 '16 09:10 Kav91

@Kav91 I have same issue. Does any one can help?

vincent714 avatar Nov 16 '16 07:11 vincent714

@vincent714 I ended up implementing https://github.com/joewalnes/reconnecting-websocket into my react project instead. Works well, haven't had any issues. Just had to set the unmount for it when switching to alternate pages that dont need it.

Kav91 avatar Nov 16 '16 10:11 Kav91

@Kav91 (batman) Thank you

vincent714 avatar Nov 17 '16 01:11 vincent714