1. 修改按月查询的数据返回

2. 修复一点击即视的死锁问题
This commit is contained in:
2024-11-14 09:44:00 +08:00
parent 763376a95c
commit 41d8da2401
2 changed files with 9 additions and 11 deletions

View File

@@ -44,7 +44,8 @@ func (h *HIKNvr) CheckTimeRegionWithMonth(year int, month int) string {
h.mux.RLock()
if h.State {
h.mux.RUnlock()
if checkTimeRegionWithMonth(h.core, year, month) == "" {
data := checkTimeRegionWithMonth(h.core, year, month)
if data == "" {
h.mux.Lock()
h.State = false
h.mux.Unlock()
@@ -52,6 +53,7 @@ func (h *HIKNvr) CheckTimeRegionWithMonth(year int, month int) string {
h.mux.Lock()
h.State = true
h.mux.Unlock()
return data
}
} else {
h.mux.RUnlock()