Closed hardillb closed 6 months ago
Currently the platform generates a non-persistent access token for use by the device editor. When the platform is restarted, those non-persitent tokens are discarded, meaning the device cannot reconnect.
We need to transition to using persistent access tokens in the platform so that the devices can reconnect after a restart. This is also a requirement as part of the scalability work.
Verified on staging. @ppawlowski restarted staging while i had a (local) device connected to the staging platform. Team: Steve on Staging Application: Demo Application Device: Device 1 (LlxGYqVarE)
I refreshed the device before, during and after.
Current Behavior
While doing local development (but all any delay in prod) if a device has an open editor tunnel connection and the forge app is restarted (e.g. by
npm run serv
) the device agent tries to reconnect after 500ms and fails with connection refused (because the forge app has not started yet). It then never tries again (the code comments imply it should try again after 1.5 seconds and then after 4.5 ....)Expected Behavior
The reconnect logic to step up the back off timer until it hits a limit or reconnects.
Steps To Reproduce
Environment