mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
possibly fixed rare crash on connect in UPSdisplay
This commit is contained in:
1 parent
ee133761f7
commit
a09cdfb1de
1 file changed
+7
-3
@@ -31,8 +31,12 @@ setInterval(function(){
|
||||
let ticksInPeriod = historicalTicks[historicalTicks.length-1].tick - historicalTicks[0].tick;
|
||||
let UPS = Math.round(ticksInPeriod / (timePeriod/1000));
|
||||
// console.log("UPS: " + UPS);
|
||||
needle.post(config.masterIP+':'+config.masterPort+'/api/editSlaveMeta', {slaveID: config.unique, password: config.clientPassword, meta: {UPS:UPS}}, function(err, resp) {
|
||||
// success?
|
||||
});
|
||||
try{
|
||||
needle.post(config.masterIP+':'+config.masterPort+'/api/editSlaveMeta', {slaveID: config.unique, password: config.clientPassword, meta: {UPS:UPS}}, function(err, resp) {
|
||||
// success?
|
||||
});
|
||||
} catch (err){
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
}, 10000);
|
||||
Reference in new issue
Block a user