Closed polszacki-tooploox closed 4 years ago
Hi @polszacki-tooploox thanks for the PR! We have an internal change to this code that we are currently testing. I will test the behavior you pointed out here and evaluate against our internal spec for this behavior.
Hi @polszacki-tooploox we just released a new version that changes this code, please test whether this suits your workflow.
It does, thanks for the update.
Change how the connection status is changed after updating the user to match the one from the 2.13.9 version of the library.
Here's the code from the version 2.13.9:
In the 2.13.9 version, if the
(!self.isOnline)
check insideupdateUser
method fromLDClientManager
failed, nothing happened to the connection status. From version 2.14.0 when the user is updated from the offline state it will force the offline state after the update is completed. If there are two consecutive calls to update the user and the second call starts when the first operation is in progress, meaning the client is set to offline for a moment to update the user, the second call will start withisOnline
set tofalse
. The first call after completing the update will set the client online again. Which is fine. But then the second call finishes and sets the client offline as it was the state the second call was started in.If there is a valid reason for it to work this way, could you at least provide a solution on how to handle updating user securely?
Console output for two update user calls one after another in quick succession: