mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
Remove federated session from internal map on cleanup.
This commit is contained in:
parent
474686a1b2
commit
91b29d4103
2 changed files with 4 additions and 1 deletions
1
hub.go
1
hub.go
|
|
@ -824,6 +824,7 @@ func (h *Hub) removeSession(session Session) (removed bool) {
|
|||
}
|
||||
delete(h.expiredSessions, session)
|
||||
if session, ok := session.(*ClientSession); ok {
|
||||
delete(h.federatedSessions, session)
|
||||
delete(h.anonymousSessions, session)
|
||||
delete(h.dialoutSessions, session)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -286,6 +286,7 @@ func WaitForHub(ctx context.Context, t *testing.T, h *Hub) {
|
|||
clients := len(h.clients)
|
||||
sessions := len(h.sessions)
|
||||
remoteSessions := len(h.remoteSessions)
|
||||
federatedSessions := len(h.federatedSessions)
|
||||
h.mu.Unlock()
|
||||
h.ru.Lock()
|
||||
rooms := len(h.rooms)
|
||||
|
|
@ -296,6 +297,7 @@ func WaitForHub(ctx context.Context, t *testing.T, h *Hub) {
|
|||
rooms == 0 &&
|
||||
sessions == 0 &&
|
||||
remoteSessions == 0 &&
|
||||
federatedSessions == 0 &&
|
||||
readActive == 0 &&
|
||||
writeActive == 0 {
|
||||
break
|
||||
|
|
@ -306,7 +308,7 @@ func WaitForHub(ctx context.Context, t *testing.T, h *Hub) {
|
|||
h.mu.Lock()
|
||||
h.ru.Lock()
|
||||
dumpGoroutines("", os.Stderr)
|
||||
assert.Fail(t, "Error waiting for hub to terminate", "clients %+v / rooms %+v / sessions %+v / remoteSessions %v / %d read / %d write: %s", h.clients, h.rooms, h.sessions, h.remoteSessions, readActive, writeActive, ctx.Err())
|
||||
assert.Fail(t, "Error waiting for hub to terminate", "clients %+v / rooms %+v / sessions %+v / remoteSessions %v / federatedSessions %v / %d read / %d write: %s", h.clients, h.rooms, h.sessions, remoteSessions, federatedSessions, readActive, writeActive, ctx.Err())
|
||||
h.ru.Unlock()
|
||||
h.mu.Unlock()
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue