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);
|
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);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue