mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 08:03:13 +09:00
Set max pending rcon requests to 1
This commit is contained in:
1 parent
d66d22a9cd
commit
f35be2f355
1 file changed
+5
-3
@@ -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,"");
|
data = data.toString("utf8").replace(/(\r\n\t|\n|\r\t)/gm,"");
|
||||||
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: 2000,
|
||||||
|
maxPending: 1
|
||||||
|
});
|
||||||
client.connect({
|
client.connect({
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
port: Number(process.env.RCONPORT) || instconf.clientPort,
|
port: Number(process.env.RCONPORT) || instconf.clientPort,
|
||||||
password: instconf.clientPassword,
|
password: instconf.clientPassword
|
||||||
timeout: 5000
|
|
||||||
});
|
});
|
||||||
client.onDidAuthenticate(() => {
|
client.onDidAuthenticate(() => {
|
||||||
console.log('Clusterio | RCON Authenticated!');
|
console.log('Clusterio | RCON Authenticated!');
|
||||||
|
|||||||
Reference in new issue
Block a user