mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-06-01 13:32:17 +02:00
Add method to get virtual sessions of a client session.
This commit is contained in:
parent
8ea6072de5
commit
6173a350a1
|
@ -1316,3 +1316,14 @@ func (s *ClientSession) RemoveVirtualSession(session *VirtualSession) {
|
||||||
delete(s.virtualSessions, session)
|
delete(s.virtualSessions, session)
|
||||||
s.mu.Unlock()
|
s.mu.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *ClientSession) GetVirtualSessions() []*VirtualSession {
|
||||||
|
s.mu.Lock()
|
||||||
|
defer s.mu.Unlock()
|
||||||
|
|
||||||
|
result := make([]*VirtualSession, 0, len(s.virtualSessions))
|
||||||
|
for session := range s.virtualSessions {
|
||||||
|
result = append(result, session)
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue