mirror of
https://github.com/Monibuca/engine.git
synced 2025-10-05 16:46:58 +08:00
fix: publish lost not shutdown
This commit is contained in:
@@ -492,16 +492,10 @@ func (s *Stream) run() {
|
||||
s.Warn("no tracks")
|
||||
if time.Since(s.StartTime) > timeout {
|
||||
lost = true
|
||||
s.action(ACTION_CLOSE)
|
||||
continue
|
||||
}
|
||||
} else if s.Publisher != nil && s.Publisher.IsClosed() {
|
||||
s.Warn("publish is closed", zap.Error(context.Cause(s.publisher)), zap.String("ptr", fmt.Sprintf("%p", s.publisher.Context)))
|
||||
lost = true
|
||||
if len(s.Tracks.Audio)+len(s.Tracks.Video) == 0 {
|
||||
s.action(ACTION_CLOSE)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
if lost {
|
||||
|
Reference in New Issue
Block a user