feat: remove puller bad pull

This commit is contained in:
langhuihui
2024-10-08 08:54:50 +08:00
parent 94602ba9b7
commit 26dfd0b5cb
2 changed files with 23 additions and 12 deletions

View File

@@ -1,7 +1,6 @@
package engine
import (
"io"
"strings"
"time"
@@ -40,7 +39,7 @@ func (pub *Puller) Reconnect() (ok bool) {
}
func (pub *Puller) startPull(puller IPuller) {
badPuller := true
// badPuller := true
var stream *Stream
var err error
streamPath := pub.StreamPath
@@ -75,14 +74,14 @@ func (pub *Puller) startPull(puller IPuller) {
}
startTime = time.Now()
if err = puller.Connect(); err != nil {
if err == io.EOF {
puller.Info("pull complete")
return
}
// if err == io.EOF {
// puller.Info("pull complete")
// return
// }
puller.Error("pull connect", zap.Error(err))
if badPuller {
return
}
// if badPuller {
// return
// }
} else {
if err = puller.Publish(pub.StreamPath, puller); err != nil {
puller.Error("pull publish", zap.Error(err))
@@ -94,7 +93,7 @@ func (pub *Puller) startPull(puller IPuller) {
puber.VideoTrack = nil
}
stream = puber.Stream
badPuller = false
// badPuller = false
if err = puller.Pull(); err != nil && !puller.IsShutdown() {
puller.Error("pull interrupt", zap.Error(err))
}