Details
Make sure we only ever log in once per app startup. I had a log for each Redux action and could configure it only appeared once
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
one try per startup
Why do we want to do this only once? Is there a downside to setting loginAttemptedRef.current to false after the login is done?
If the login was successful, we certainly don't want to try it again. So the idea here is probably more about trying it again if the login fails.
I'm not sure about this idea. If for instance the network is down when the app opens, would we be trying in an infinite loop? We'd probably at least want a delay between retries, similar to how the keyserver <> client socket in lib/socket/socket.react.js works. But then the solution gets more complex: we would probably want something like a debounce here.
My assessment is that the current solution is probably fine for now. If we want to implement retries, we can add those later.