mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 16:23:12 +09:00
Fixed rcon timeout in the right place, set to 200s for 1250kB commands
This commit is contained in:
1 parent
a122f2b09e
commit
6c32271c56
1 file changed
+5
-4
@@ -365,7 +365,7 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
if(data.includes("Starting RCON interface")){
|
if(data.includes("Starting RCON interface")){
|
||||||
let client = new Rcon({
|
let client = new Rcon({
|
||||||
packetResponseTimeout: 20000,
|
packetResponseTimeout: 200000,
|
||||||
maxPending: 5
|
maxPending: 5
|
||||||
});
|
});
|
||||||
client.connect({
|
client.connect({
|
||||||
@@ -495,8 +495,10 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n
|
|||||||
// connect to the server with rcon
|
// connect to the server with rcon
|
||||||
if(true || process.platform != "linux"){
|
if(true || process.platform != "linux"){
|
||||||
// IP, port, password
|
// 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
|
// 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
|
// we read the log every 2 seconds and stop looping when we start connecting to factorio
|
||||||
function checkRcon() {
|
function checkRcon() {
|
||||||
@@ -507,7 +509,6 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n
|
|||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
port: args["rcon-port"] || Number(process.env.RCONPORT) || instanceconfig.clientPort,
|
port: args["rcon-port"] || Number(process.env.RCONPORT) || instanceconfig.clientPort,
|
||||||
password: args["rcon-password"] || instanceconfig.clientPassword,
|
password: args["rcon-password"] || instanceconfig.clientPassword,
|
||||||
timeout: 5000
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
|
|||||||
Reference in new issue
Block a user