Merge pull request #7 from Danielv123/master

pull updates
This commit is contained in:
Godmave authored and GitHub committed 2019-07-06 19:57:53 +02:00
commit 10d5b0da9b
2 files changed
+12 -9

No files matched your search

+9 -6
View File
@@ -364,12 +364,14 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n
data = data.toString("utf8").replace(/(\r\n\t|\n|\r\t)/gm,"");
console.log(data);
if(data.includes("Starting RCON interface")){
let client = new Rcon();
let client = new Rcon({
packetResponseTimeout: 200000,
maxPending: 5
});
client.connect({
host: 'localhost',
port: Number(process.env.RCONPORT) || instconf.clientPort,
password: instconf.clientPassword,
timeout: 5000
password: instconf.clientPassword
});
client.onDidAuthenticate(() => {
console.log('Clusterio | RCON Authenticated!');
@@ -493,8 +495,10 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n
// connect to the server with rcon
if(true || process.platform != "linux"){
// IP, port, password
client = new Rcon();
client = new Rcon({
packetResponseTimeout: 200000, // 200s, should allow for commands up to 1250kB in length
maxPending: 5
});
// check the logfile to see if the RCON interface is running as there is no way to continue without it
// we read the log every 2 seconds and stop looping when we start connecting to factorio
function checkRcon() {
@@ -505,7 +509,6 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n
host: 'localhost',
port: args["rcon-port"] || Number(process.env.RCONPORT) || instanceconfig.clientPort,
password: args["rcon-password"] || instanceconfig.clientPassword,
timeout: 5000
});
} else {
setTimeout(function(){
+3 -3
View File
@@ -56,20 +56,20 @@
"node-factorio-api": "^0.3.1-alpha",
"node-forge": "^0.7.1",
"prom-client": "^10.2.3",
"rcon-client": "^3.0.2",
"rcon-client": "^3.1.6",
"request": "^2.83.0",
"right-pad": "^1.0.1",
"rmdir-sync": "^1.0.1",
"sanitizer": "^0.1.3",
"simple-git": "^1.96.0",
"single-line-log": "^1.1.2",
"snyk": "^1.134.2",
"socket.io": "^2.0.4",
"socket.io-client": "^2.0.4",
"socket.io-prometheus": "^0.2.1",
"sync-request": "^4.0.1",
"typescript-collections": "^1.3.2",
"underscore": "^1.8.3",
"snyk": "^1.134.2"
"underscore": "^1.8.3"
},
"devDependencies": {
"documentation": "^5.4.0",