mirror of
https://github.com/livekit/livekit.git
synced 2026-05-17 20:05:51 +00:00
release read lock on AddSubscriber earlier
This commit is contained in:
@@ -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