AutoReconnect behavior after a failed client upgrade in Photon Realtime
19K reputation · 01 Oct 2023, 07:19 UTC
AutoReconnect behavior after a failed client upgrade
Photon Realtime’s AutoReconnect feature is designed to restore a client’s connection to the same server and room following a transient network drop. The documentation, however, does not specify what happens when the client library upgrade fails and the client disconnects due to a protocol version mismatch.
The goal is to determine whether AutoReconnect will automatically attempt to re‑enter the same room after such an upgrade failure or if the application must explicitly call JoinRoom again. Key constraints include the potential for the server to reject the reconnection attempt because the client’s protocol version no longer matches the server’s expected version, which could leave the client disconnected or in an inconsistent state.
Uncertainty remains about the sequence of ConnectionState transitions, whether the client receives any callbacks indicating a failed reconnection, and if AutoReconnect will retry or abandon the attempt after a protocol mismatch.
Specific questions to investigate:
- Does
AutoReconnectautomatically try to re‑join the same room when a client upgrade fails? - If the server rejects the reconnection due to a protocol version mismatch, does
AutoReconnectretry or terminate the connection? - What callbacks or connection state changes are triggered during this scenario, and how can an application detect a failed reconnection attempt?