未验证 提交 adfc5496 编写于 作者: G GitSquared

🐛 Fix multithreading errors after exit

上级 b8839572
......@@ -54,9 +54,13 @@ if (cluster.isMaster) {
cluster.on("message", (worker, msg) => {
msg = JSON.parse(msg);
if (queue[msg.id]) {
queue[msg.id].send("systeminformation-reply-"+msg.id, msg.res);
delete queue[msg.id];
try {
if (!queue[msg.id].isDestroyed()) {
queue[msg.id].send("systeminformation-reply-"+msg.id, msg.res);
delete queue[msg.id];
}
} catch(e) {
// Window has been closed, ignore.
}
});
} else if (cluster.isWorker) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册