fix: Deadlock issue caused by device logout (#315)

Co-authored-by: yjx <yjx>
This commit is contained in:
yangjinxing123
2025-08-15 15:25:28 +08:00
committed by langhuihui
parent eba62c4054
commit 2034f068c0
2 changed files with 14 additions and 1 deletions

View File

@@ -1,5 +1,17 @@
# Monibuca v5.0.x Release Notes # Monibuca v5.0.x Release Notes
## v5.0.4 (2025-08-15)
### 新增 / 改进 (Features & Improvements)
- GB28181: 支持更新 channelName / channelIdeba62c4
- 定时任务(crontab): 初始化 SQL 支持2bbee90
- Snap 插件: 支持批量抓图272def3
- 管理后台: 支持自定义首页15d830f
- 推/拉代理: 支持可选参数更新ad32f6f
- 心跳/脉冲: pulse interval 允许为 017faf3f
- 告警上报: 通过 Hook 发送报警baf3640
- 告警信息上报: 通过 Hook 发送 alarminfocad47ae
## v5.0.3 (2025-06-27) ## v5.0.3 (2025-06-27)
### 🎉 新功能 (New Features) ### 🎉 新功能 (New Features)

View File

@@ -137,10 +137,11 @@ func (d *Device) Dispose() {
if channel.PullProxyTask != nil { if channel.PullProxyTask != nil {
channel.PullProxyTask.ChangeStatus(m7s.PullProxyStatusOffline) channel.PullProxyTask.ChangeStatus(m7s.PullProxyStatusOffline)
} }
d.channels.RemoveByKey(channel.ID) //d.channels.RemoveByKey(channel.ID)
d.plugin.channels.RemoveByKey(channel.ID) d.plugin.channels.RemoveByKey(channel.ID)
return true return true
}) })
d.channels.Clear()
} }
// 保存设备信息 // 保存设备信息
d.plugin.DB.Save(d) d.plugin.DB.Save(d)