适配引擎变更

This commit is contained in:
dexter
2022-03-01 20:43:22 +08:00
parent 9b165bb4f3
commit 13e8d4e6a2
2 changed files with 1 additions and 8 deletions

View File

@@ -8,7 +8,6 @@ import (
"strings"
"time"
. "github.com/logrusorgru/aurora"
amf "github.com/zhangpeihao/goamf"
"go.uber.org/zap"
. "m7s.live/engine/v4"
@@ -27,12 +26,6 @@ type HDLConfig struct {
func (c *HDLConfig) OnEvent(event any) {
switch v := event.(type) {
case FirstConfig:
if c.ListenAddr != "" || c.ListenAddrTLS != "" {
plugin.Info(Green("HDL Server Start").String(), zap.String("ListenAddr", c.ListenAddr), zap.String("ListenAddrTLS", c.ListenAddrTLS))
go c.Listen(plugin, c)
} else {
plugin.Info(Green("HDL start reuse engine port").String())
}
if c.PullOnStart {
for streamPath, url := range c.PullList {
if err := plugin.Pull(streamPath, url, new(HDLPuller), false); err != nil {

View File

@@ -15,7 +15,7 @@ import (
)
func (puller *HDLPuller) Connect() (err error) {
puller.ReConnectCount++
log.Info("connect", zap.String("remoteURL", puller.RemoteURL))
if strings.HasPrefix(puller.RemoteURL, "http") {
var res *http.Response