mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 11:40:13 +00:00
给map 添加写锁
This commit is contained in:
parent
3e9bb1d5bf
commit
5f6481b5bf
@ -425,7 +425,10 @@ func (p *Pool) CompareWithExpr(exp *vm.Program, other *pkg.Baseline) bool {
|
||||
func (p *Pool) addFuzzyBaseline(bl *pkg.Baseline) {
|
||||
if _, ok := p.baselines[bl.Status]; !ok && IntsContains(FuzzyStatus, bl.Status) {
|
||||
bl.Collect()
|
||||
var lock sync.Mutex
|
||||
lock.Lock()
|
||||
p.baselines[bl.Status] = bl
|
||||
lock.Unlock()
|
||||
logs.Log.Importantf("[baseline.%dinit] %s", bl.Status, bl.String())
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user