1. 修改按月查询的数据返回
2. 修复一点击即视的死锁问题
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user