mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 23:24:52 +09:00
The web interface loads plugin bundles, registers their messages and adds their config fields once in bootstrap, and has no way to undo any of it. A controller restarted to pick up a plugin being installed, enabled or disabled comes back running a different set, and a controller started in recovery mode runs none of them while still accepting control connections, so open pages carry on sending messages it no longer handles. The controller already states the plugins it is running in the handshake it sends on every connection, which is what hosts track as serverPlugins and use to decide what to forward and which instance plugins to load. Compare that against the set the page loaded and stop rendering on a mismatch, asking to be reloaded instead. The comparison is against loaded rather than enabled because loaded is what the handshake reports and what the controller is actually running; enabled also takes load_plugin into account, which only applies from the next restart and would otherwise latch a permanent mismatch. Closes #804