From 641234512081da6e58989c80d8a63d7f69c2502c Mon Sep 17 00:00:00 2001 From: Tom Berger Date: Mon, 25 Oct 2021 23:14:44 -0400 Subject: [PATCH] Add relay peers to peerCount so session is not closed if relay peers exist (#597) --- pkg/sfu/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sfu/session.go b/pkg/sfu/session.go index 24719a2cd..a15f1e930 100644 --- a/pkg/sfu/session.go +++ b/pkg/sfu/session.go @@ -148,7 +148,7 @@ func (s *SessionLocal) RemovePeer(p Peer) { if s.peers[pid] == p { delete(s.peers, pid) } - peerCount := len(s.peers) + peerCount := len(s.peers) + len(s.relayPeers) s.mu.Unlock() // Close SessionLocal if no peers