If the connection to gateway from myscontroller-rs breaks abruptly (like pulling the ethernet cable off), then myscontroller-rs doesn't try to reconnect.
Home Assistant handles this scenario by sending I_VERSION(2) INTERNAL(3) messages once every 10 seconds and expects a response back with a timeout of 10 seconds.
If the response doesn't come back within timeout, then it disconnects the connection and attempts reconnect and sends the I_VERSION message again.
If the connection to gateway from myscontroller-rs breaks abruptly (like pulling the ethernet cable off), then myscontroller-rs doesn't try to reconnect. Home Assistant handles this scenario by sending I_VERSION(2) INTERNAL(3) messages once every 10 seconds and expects a response back with a timeout of 10 seconds. If the response doesn't come back within timeout, then it disconnects the connection and attempts reconnect and sends the I_VERSION message again.