1
0
Fork 0
forked from svrjs/svrjs

Improve Bun fake IPC connections error handling.

This commit is contained in:
Dorian Niemiec 2023-08-10 04:20:30 +02:00
parent 7820c5aade
commit 986c883327

8
svr.js
View file

@ -282,14 +282,8 @@ if (!singlethreaded) {
fakeWorkerIPCConnection.end(message);
});
} catch (err) {
if (tries > 25) {
newWorker.emit("error", err);
return;
}
setTimeout(function () {
if (tries > 50) throw err;
newWorker.send(message, fakeParam2, fakeParam3, fakeParam4, tries + 1);
}, 10);
}
};
}