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 {
|
for _, t := range p.publishedTracks {
|
||||||
tracks = append(tracks, t)
|
tracks = append(tracks, t)
|
||||||
}
|
}
|
||||||
defer p.lock.RUnlock()
|
p.lock.RUnlock()
|
||||||
|
|
||||||
if len(tracks) == 0 {
|
if len(tracks) == 0 {
|
||||||
return 0, nil
|
return 0, nil
|
||||||
|
|||||||
Reference in New Issue
Block a user