[fix] 获取group中播放者数量时锁没有释放,导致后续无法转发数据

pull/49/head
q191201771 4 years ago
parent 68e3557684
commit 98e63a62a2

@ -535,10 +535,10 @@ func (group *Group) OnAVPacket(pkt base.AVPacket) {
func (group *Group) StringifyDebugStats() string {
group.mutex.Lock()
subLen := len(group.rtmpSubSessionSet) + len(group.httpflvSubSessionSet) + len(group.httptsSubSessionSet) + len(group.rtspSubSessionSet)
group.mutex.Unlock()
if subLen > 10 {
return fmt.Sprintf("[%s] not log out all stats. subLen=%d", group.UniqueKey, subLen)
}
group.mutex.Unlock()
b, _ := json.Marshal(group.GetStat())
return string(b)
}

Loading…
Cancel
Save