mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-29 17:54:07 +09:00
The SetPolicy API handler calls State.SetPolicy, which already rebuilds the peer map when the policy changed, and then ReloadPolicy, which rebuilt it again even when nothing changed. So every policy write built the peer map twice. ReloadPolicy now rebuilds only when the policy really changed. A test checks one build per changed write and none for an unchanged reload. Part of #3549