Sync callback before transaction actually completes (?)
Closed this issue · 1 comments
arneke commented
Hi,
I'm wondering if there is a race condition related to the sync callback function.
It's currently called inside the transaction, at the end of _finishSync:
https://github.com/orbitaloop/WebSqlSync/blob/master/client_src/webSqlSync.js#L342
But shouldn't it be used as a success / failure handler for the transaction itself, added after line 345?
EDIT: Sorry, I have been living under a rock. I have been working on an app using the asynchronous API for so long that I forgot that on most platforms a synchronous one exists. Maybe write that the project requires the synchronous one, but it is certainly not a race condition.
orbitaloop commented
Thanks for pointing out