mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-09-26 23:05:55 +08:00
fix: platform register failed
This commit is contained in:
@@ -435,13 +435,10 @@ func (gb *GB28181Plugin) checkPlatform() {
|
||||
gb.Error("查询平台失败", "error", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
gb.Info("找到启用状态的平台", "count", len(platformModels))
|
||||
|
||||
if gb.Platforms != nil && len(gb.Platforms) > 0 {
|
||||
platformModels = append(platformModels, gb.Platforms...)
|
||||
}
|
||||
|
||||
gb.Info("找到启用状态的平台", "count", len(platformModels))
|
||||
// 遍历所有平台进行初始化和注册
|
||||
for _, platformModel := range platformModels {
|
||||
if platformModel.Enable {
|
||||
|
@@ -97,7 +97,7 @@ func NewPlatform(pm *gb28181.PlatformModel, plugin *GB28181Plugin, unRegister bo
|
||||
p.DialogClient = sipgo.NewDialogClientCache(p.Client, *p.ContactHDR)
|
||||
|
||||
p.MaxForwardsHDR = sip.MaxForwardsHeader(70)
|
||||
p.plugin.platforms.Set(p)
|
||||
//p.plugin.platforms.Set(p)
|
||||
p.OnDispose(func() {
|
||||
if plugin.platforms.RemoveByKey(p.PlatformModel.ServerGBID) {
|
||||
//for c := range d.channels.Range {
|
||||
|
Reference in New Issue
Block a user