增加Stream NeverTimeout属性,用于纯数据轨道的流保持不关闭

消除一处魔法数字
将TCP监听增加TLS支持
This commit is contained in:
langhuihui
2023-06-04 11:02:45 +08:00
parent fc7ac81c4e
commit f4fb7881f7
14 changed files with 210 additions and 42 deletions

View File

@@ -130,7 +130,7 @@ func (opt *Plugin) assign() {
opt.Disabled = false
//移除这个属性防止反序列化报错
delete(opt.RawConfig, "enable")
}
}
if opt.Disabled {
opt.Warn("plugin disabled")
return
@@ -172,6 +172,9 @@ func (opt *Plugin) run() {
if conf, ok := opt.Config.(config.HTTPConfig); ok {
go conf.Listen(opt)
}
if conf, ok := opt.Config.(config.TCPConfig); ok {
go conf.ListenTCP(opt, opt.Config.(config.TCPPlugin))
}
}
// Update 热更新配置