mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
guard against index worker rpc responses for a txid with no supplied callback
This commit is contained in:
parent
cc335a54b1
commit
2ef0af29e5
@ -835,7 +835,14 @@ HK.initializeIndexWorkers = function (Env, config, _cb) {
|
||||
worker.on('message', function (res) {
|
||||
if (!res || !res.txid) { return; }
|
||||
//console.log(res);
|
||||
response.handle(res.txid, [res.error, res.value]);
|
||||
try {
|
||||
response.handle(res.txid, [res.error, res.value]);
|
||||
} catch (err) {
|
||||
Env.Log.error("INDEX_WORKER", {
|
||||
error: err,
|
||||
response: res,
|
||||
});
|
||||
}
|
||||
});
|
||||
worker.on('exit', function () {
|
||||
var idx = workers.indexOf(worker);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user