Push a status snapshot when VNC sessions start or end

This commit is contained in:
Viktor Liu
2026-07-30 15:18:31 +02:00
parent abd5022e18
commit 90d2687e48
2 changed files with 48 additions and 19 deletions
+4
View File
@@ -142,6 +142,10 @@ func (e *Engine) startVNCServer() error {
NetstackNet: e.wgInterface.GetNet(),
RequireApproval: requireApproval,
Approver: &vncApprover{broker: e.approvalBroker, statusRecorder: e.statusRecorder},
// Session start/stop is invisible to the peer status recorder, so push a
// snapshot ourselves; otherwise the UI's session list goes stale until an
// unrelated peer change happens to fire one.
OnSessionsChanged: e.statusRecorder.NotifyStateChange,
})
listenAddr := netip.AddrPortFrom(netbirdIP, vnc.InternalPort)