mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 07:24:52 +09:00
Fixed stack size exceeded bug
This commit is contained in:
1 parent
a8dfd22eeb
commit
181cb1179c
2 files changed
+6
-8
No files matched your search
@@ -1,6 +1,5 @@
|
||||
module.exports = class remoteCommands {
|
||||
constructor(mergedConfig, messageInterface, extras){
|
||||
console.log = messageInterface;
|
||||
this.messageInterface = messageInterface;
|
||||
this.config = mergedConfig;
|
||||
this.socket = extras.socket;
|
||||
|
||||
@@ -3,24 +3,22 @@ const needle = require("needle");
|
||||
|
||||
|
||||
class ResearchSync {
|
||||
|
||||
constructor(slaveConfig, messageInterface){
|
||||
this.functions = this.loadFunctions();
|
||||
this.config = slaveConfig;
|
||||
this.messageInterface = messageInterface;
|
||||
console.log = messageInterface;
|
||||
|
||||
this.research = {};
|
||||
|
||||
messageInterface("ResearchSync enabled");
|
||||
setInterval(() => {
|
||||
this.doSync();
|
||||
this.pollResearch();
|
||||
setTimeout(this.doSync, 2)
|
||||
}, 2000);
|
||||
}, 30000);
|
||||
}
|
||||
|
||||
pollResearch() {
|
||||
this.messageInterface("Polling Research\n")
|
||||
// this.messageInterface("Polling Research\n")
|
||||
this.messageInterface(this.functions.dumpResearch);
|
||||
}
|
||||
|
||||
@@ -59,8 +57,9 @@ class ResearchSync {
|
||||
// this.messageInterface("/c game.forces['player'].technologies['" + key + "'].researched=true");
|
||||
}
|
||||
})
|
||||
|
||||
console.log("difference from other servers", difference);
|
||||
if(Object.keys(difference).length > 0){
|
||||
this.messageInterface("difference from other servers", difference);
|
||||
}
|
||||
needle.post(this.config.masterIP + ':' + this.config.masterPort + '/api/editSlaveMeta', {
|
||||
instanceID: this.config.unique,
|
||||
password: this.config.clientPassword,
|
||||
|
||||
Reference in new issue
Block a user