mirror of
https://github.com/livekit/livekit.git
synced 2026-11-12 07:48:53 +00:00
release read lock on AddSubscriber earlier
This commit is contained in:
1 parent
d2cadac2b3
commit
7173dcc1d1
1 file changed
+1
-1
@@ -421,7 +421,7 @@ func (p *ParticipantImpl) AddSubscriber(op types.Participant) (int, error) {
|
||||
for _, t := range p.publishedTracks {
|
||||
tracks = append(tracks, t)
|
||||
}
|
||||
defer p.lock.RUnlock()
|
||||
p.lock.RUnlock()
|
||||
|
||||
if len(tracks) == 0 {
|
||||
return 0, nil
|
||||
|
||||
Reference in new issue
Block a user