mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 23:53:13 +09:00
Cache getMac
This commit is contained in:
1 parent
7b661781f2
commit
f5fa8a4ca9
1 file changed
+8
-2
@@ -581,7 +581,8 @@ function instanceManagement() {
|
|||||||
playerCount: instanceInfo.playerCount || 0,
|
playerCount: instanceInfo.playerCount || 0,
|
||||||
instanceName: instance,
|
instanceName: instance,
|
||||||
}
|
}
|
||||||
getMac(function (err, mac) {
|
//remote.call('clusterio','setWorldID',1234)
|
||||||
|
function callback(err, mac) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log("##### getMac crashed, but we don't really give a shit because we are probably closing down #####");
|
console.log("##### getMac crashed, but we don't really give a shit because we are probably closing down #####");
|
||||||
} else {
|
} else {
|
||||||
@@ -597,7 +598,12 @@ function instanceManagement() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
if(global.mac){
|
||||||
|
getMac(callback);
|
||||||
|
} else {
|
||||||
|
callback(undefined, global.mac);
|
||||||
|
}
|
||||||
},1000)});
|
},1000)});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user