26.03.2018, 08:48
Disconnect might happen from the server side. To keep connection alive you probably need to request data periodically or send ping frames.
As for reconnect, enable/disable is one approach, another one is just to keep script running and check if connect is ok or not. When device is offline then connect function will return once timeout is reached.
As for reconnect, enable/disable is one approach, another one is just to keep script running and check if connect is ok or not. When device is offline then connect function will return once timeout is reached.