mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 15:14:52 +09:00
The config changed handler ran updateFactorioSettings and updateFactorioWhitelist as soon as the field changed. While the instance is starting, stopping, creating_save or exporting_data the server is not ready for RCON, so the update threw and was only logged. The three list update events pushed from the controller had the same problem, except Link._processEvent swallowed the rejection and the update was lost without a trace. Add _waitForSettledStatus, which resolves once notifyStatus lands on running or stopped. notifyStatus is the only place _status changes and notifyExit always ends on stopped, so a waiter cannot hang. The settings, whitelist and list updates now go through it. Nothing is applied when the instance settles on stopped, because there is no server to apply it to. factorio.settings is written to server-settings.json and the lists to the list files on the next start, and enableWhitelist is read from the config when the next Instance is constructed. The plugin hook now runs immediately for the two config fields instead of being chained onto the update. Every other field already invokes it right away, and waiting for the instance to settle would hold the notification back for the whole startup. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>