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

10
svr.js
View file

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