Skip to content

Commit

Permalink
[fix] 获取group中播放者数量时锁没有释放,导致后续无法转发数据
Browse files Browse the repository at this point in the history
  • Loading branch information
q191201771 committed Feb 1, 2021
1 parent e1b89c7 commit 5993af7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/logic/group.go
Expand Up @@ -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)
}
Expand Down

0 comments on commit 5993af7

Please sign in to comment.