优化代码

This commit is contained in:
刘祥超
2023-08-08 15:39:00 +08:00
parent f4258ed00e
commit 075c11a3cf
22 changed files with 27 additions and 53 deletions

View File

@@ -45,7 +45,7 @@ func (this *WAFManager) UpdatePolicies(policies []*firewallconfigs.HTTPFirewallP
// FindWAF 查找WAF
func (this *WAFManager) FindWAF(policyId int64) *WAF {
this.locker.RLock()
w, _ := this.mapping[policyId]
var w = this.mapping[policyId]
this.locker.RUnlock()
return w
}