mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-02-18 00:17:39 +01:00
When api_tokens.json is modified on disk, the ConfigWatcher reloads the tokens into memory. However, the Monitor's dockerTokenBindings and hostTokenBindings maps were not synchronized with the new token set, causing orphaned bindings when agents reconnect after reinstall. Add SetAPITokenReloadCallback to ConfigWatcher that triggers Monitor's new RebuildTokenBindings method after token reload. This method reconstructs the binding maps from current Docker host and host agent state, keeping only bindings for tokens that still exist in config. Related to #773