diff options
author | stephan <stephan@noemail.net> | 2022-10-30 10:24:53 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-10-30 10:24:53 +0000 |
commit | 9163ef1f4dcd60ff2e7d77fcc130b523a9a6b4f3 (patch) | |
tree | 4fce4344f8177079068202dd81856532ca6574b7 /ext/wasm/api/sqlite3-opfs-async-proxy.js | |
parent | 1fc6ffccc55fc7105ce9426149e63446e062c01f (diff) | |
download | sqlite-9163ef1f4dcd60ff2e7d77fcc130b523a9a6b4f3.tar.gz sqlite-9163ef1f4dcd60ff2e7d77fcc130b523a9a6b4f3.zip |
Adjust automatic OPFS locking retries such that they will wait up to a total of 3 seconds spanning 4 attempts.
FossilOrigin-Name: bbce49d81abc491ca666474040a53057e26e99131fea9449de253f88f4415ded
Diffstat (limited to 'ext/wasm/api/sqlite3-opfs-async-proxy.js')
-rw-r--r-- | ext/wasm/api/sqlite3-opfs-async-proxy.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/wasm/api/sqlite3-opfs-async-proxy.js b/ext/wasm/api/sqlite3-opfs-async-proxy.js index 254da7ee5..d32390f07 100644 --- a/ext/wasm/api/sqlite3-opfs-async-proxy.js +++ b/ext/wasm/api/sqlite3-opfs-async-proxy.js @@ -150,9 +150,9 @@ const getSyncHandle = async (fh)=>{ if(!fh.syncHandle){ const t = performance.now(); log("Acquiring sync handle for",fh.filenameAbs); - const maxTries = 3; - let i = 1, ms = 300; - for(; true; ms *= ++i){ + const maxTries = 4, msBase = 300; + let i = 1, ms = msBase; + for(; true; ms = msBase * ++i){ try { //if(i<3) toss("Just testing."); //TODO? A config option which tells it to throw here |