mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 08:23:12 +09:00
Fix blank port/password being sent to master
Fix client sending a blank port/password when these are configured as null and generated by the FactorioServer class.
This commit is contained in:
1 parent
93480c8b29
commit
4d94fb9a6c
1 file changed
+6
@@ -439,6 +439,12 @@ async function startInstance(config, args, instance) {
|
|||||||
let server = new factorio.FactorioServer(path.join("factorio", "data"), instance.path(), options);
|
let server = new factorio.FactorioServer(path.join("factorio", "data"), instance.path(), options);
|
||||||
await server.init();
|
await server.init();
|
||||||
|
|
||||||
|
// FactorioServer.init may have generated a random port or password
|
||||||
|
// if they were null.
|
||||||
|
instanceconfig.factorioPort = server.gamePort
|
||||||
|
instanceconfig.clientPort = server.rconPort
|
||||||
|
instanceconfig.clientPassword = server.rconPassword
|
||||||
|
|
||||||
server.on('output', function(output) {
|
server.on('output', function(output) {
|
||||||
console.log("Fact: " + output.message);
|
console.log("Fact: " + output.message);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user