forked from svrjs/svrjs
Improve Bun fake IPC connections error handling.
This commit is contained in:
parent
7820c5aade
commit
986c883327
1 changed files with 2 additions and 8 deletions
10
svr.js
10
svr.js
|
@ -282,14 +282,8 @@ if (!singlethreaded) {
|
|||
fakeWorkerIPCConnection.end(message);
|
||||
});
|
||||
} catch (err) {
|
||||
if (tries > 25) {
|
||||
newWorker.emit("error", err);
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
newWorker.send(message, fakeParam2, fakeParam3, fakeParam4, tries + 1);
|
||||
}, 10);
|
||||
if (tries > 50) throw err;
|
||||
newWorker.send(message, fakeParam2, fakeParam3, fakeParam4, tries + 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Reference in a new issue