MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / notifySessionCountChange

Method notifySessionCountChange

internal/vnc/session_manager.go:475–481  ·  view source on GitHub ↗

notifySessionCountChange calls the registered callback with the current session count. This method must be called with the manager mutex held.

()

Source from the content-addressed store, hash-verified

473// notifySessionCountChange calls the registered callback with the current session count.
474// This method must be called with the manager mutex held.
475func (sm *SessionManager) notifySessionCountChange() {
476 if sm.sessionCountCallback != nil {
477 count := len(sm.sessions)
478 // Call callback in a separate goroutine to avoid blocking session management
479 go sm.sessionCountCallback(count)
480 }
481}
482
483// ListSessions returns a slice of all currently active VNC sessions.
484// The returned sessions are copies and safe to use without additional locking.

Callers 5

CloseSessionMethod · 0.95
CloseAllSessionsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected