Merge pull request #275 from Mirdinus/develop

Rcon port config
This commit is contained in:
Mitch Roote 2021-04-17 14:24:42 -04:00 committed by GitHub
commit bdc79b9073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,8 +177,10 @@ func (config *Config) loadServerConfig() {
config.FactorioAdminFile = filepath.Join(config.FactorioConfigDir, config.FactorioAdminFile)
}
// Set random port as rconPort
config.FactorioRconPort = randomPort()
if config.FactorioRconPort == 0 {
config.FactorioRconPort = randomPort()
log.Println("Rcon port is empty, generated new one:", config.FactorioRconPort)
}
}
// Returns random port to use for rcon connection