修复DTS生成时遇到PTS超过循环的情况

This commit is contained in:
dexter
2023-01-30 22:17:34 +08:00
parent db6f8de3a7
commit b306f65a7a
10 changed files with 52 additions and 34 deletions

View File

@@ -286,8 +286,8 @@ func (opt *Plugin) Pull(streamPath string, url string, puller IPuller, save int)
time.Sleep(time.Second * 5)
} else {
if err = opt.Publish(streamPath, puller); err != nil {
if puber := Streams.Get(streamPath).Publisher; puber != puller && puber != nil {
io := puber.GetPublisher()
if stream := Streams.Get(streamPath); stream != nil && stream.Publisher != puller && stream.Publisher != nil {
io := stream.Publisher.GetPublisher()
opt.Error("puller is not publisher", zap.String("ID", io.ID), zap.String("Type", io.Type), zap.Error(err))
return
}