-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
applyRemoteChanges()
should be handled as promise.
#11
Comments
Also the |
Hey and thanks for the issue. From what I remember and from looking at the code I'm pretty sure that the current implementation is the way I wanted it at the time. You are right that the code doesn't wait on the promise but that shouldn't make any difference. I guess we could call onSuccess after the promise fulfilled to avoid calling again the server before the client is done with the current changes but I don't remember this causing any issues. In case applyRemoteChanges is rejected internally then the whole process stops anyway and if I remember correctly Dexie.Syncable informs the client of this (See sync_client/src/sync_client.js Line 42 in 103f1ca
Does the current behaviour of the library cause any issues? Yes you are correct that |
Thank You for the reply. I don't know if this will cause any issue, I am not using this library. I used the code of the |
According to the source code of applyRemoteChanges
His invocation at poll_sync_protocol.js#L40 should be handled as promise to be sure to follow the correct workflow.
The text was updated successfully, but these errors were encountered: