Reconnecting after lost connection
Describe the bug Based on #75 and #95 it appears there is no way to reconnect a WebSocket after connection is lost and restored. Does anyone have a workaround/solution for this?
To Reproduce Connect through Wifi router Disconnect router Try to re-establish connection
Expected behavior The Websocket needs to be able to reconnect.
I am using this library with matth-x's OCPP as it works with any client (not just Wifi). There is a lot invested in the code to get this working, but not being able to reconnect is major issue. Especially if the solution is to delete and reallocate new WebSocket, it won't work as the OCPP library is already initialised with Websocket object and cannot be initialised again.
websocket closes if there are no messages. run socket.ping() in a loop every 30 seconds. This is not a solution, but it may help
The problem is still actual, I'm working on a project (LilyGo Board with POE Eth), and yes, I simulate lost of internet (by pulling out the cable not from board, but from WAN port instead) and my device get in stuck...