notifySessionCountChange calls the registered callback with the current session count. This method must be called with the manager mutex held.
()
| 473 | // notifySessionCountChange calls the registered callback with the current session count. |
| 474 | // This method must be called with the manager mutex held. |
| 475 | func (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. |
no outgoing calls
no test coverage detected