diff options
author | stephan <stephan@noemail.net> | 2023-12-12 17:52:27 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2023-12-12 17:52:27 +0000 |
commit | 9710fa119e2d4196b1afbffb1f8b17659b0021f5 (patch) | |
tree | 3eca22b4821cfa75c4b67db539c5ad7623e6f2f0 /ext/wasm/api/sqlite3-worker1-promiser.c-pp.js | |
parent | df25a8fd4b7cc8699b13480f5372d0bb04f43474 (diff) | |
download | sqlite-9710fa119e2d4196b1afbffb1f8b17659b0021f5.tar.gz sqlite-9710fa119e2d4196b1afbffb1f8b17659b0021f5.zip |
Worker1 Promiser API: when multiple db connections are active then use the requested connection instead of always the first-opened connection. Bug reported in [forum:894c330e7f23b177|forum post 894c330e7f23b177].
FossilOrigin-Name: 194276e18e0268829061c09317e7f9f527a703eb45f1755ff1dd30bd99dc1b68
Diffstat (limited to 'ext/wasm/api/sqlite3-worker1-promiser.c-pp.js')
-rw-r--r-- | ext/wasm/api/sqlite3-worker1-promiser.c-pp.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/wasm/api/sqlite3-worker1-promiser.c-pp.js b/ext/wasm/api/sqlite3-worker1-promiser.c-pp.js index 1f88b713a..d4445cdcd 100644 --- a/ext/wasm/api/sqlite3-worker1-promiser.c-pp.js +++ b/ext/wasm/api/sqlite3-worker1-promiser.c-pp.js @@ -199,10 +199,11 @@ globalThis.sqlite3Worker1Promiser = function callee(config = callee.defaultConfi msg = Object.create(null); msg.type = arguments[0]; msg.args = arguments[1]; + msg.dbId = msg.args.dbId; }else{ toss("Invalid arugments for sqlite3Worker1Promiser()-created factory."); } - if(!msg.dbId) msg.dbId = dbId; + if(!msg.dbId && msg.type!=='open') msg.dbId = dbId; msg.messageId = genMsgId(msg); msg.departureTime = performance.now(); const proxy = Object.create(null); |