fix: 订阅不存在的流时没有resolve导致卡死

This commit is contained in:
dexter
2022-03-10 09:01:57 +08:00
parent 67ac4c2d3c
commit acfa032f33
2 changed files with 6 additions and 7 deletions

View File

@@ -308,10 +308,10 @@ func (s *Stream) run() {
}
suber.OnEvent(t) // 把现有的Track发给订阅者
}
v.Resolve(util.Null)
} else {
waitP = append(waitP, v)
}
v.Resolve(util.Null)
if len(s.Subscribers) == 1 {
s.action(ACTION_FIRSTENTER)
}