Hi, with this SDK the websocket will automatically reconnect when a dropped connection is detected. You will see an error containing “pong timeout” “closing socket to reconnect” (info level log), and it should immediately kill the old connection and open a new one to replace it. When this happens, you will also have the option of adding an event listener on the “reconnecting” and the “reconnected” events:
The latter can be a good opportunity to trigger any REST API calls to ensure your local state isn’t out of sync (e.g. fetch balance, positions, orders).