From 6d47b4a2e0afad2866a47fc48823c6d3740689e6 Mon Sep 17 00:00:00 2001 From: didi Date: Mon, 9 Sep 2019 17:44:10 +0800 Subject: [PATCH] GetMapData change to read lock --- toolbox/statistics.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolbox/statistics.go b/toolbox/statistics.go index d014544c..fd73dfb3 100644 --- a/toolbox/statistics.go +++ b/toolbox/statistics.go @@ -117,8 +117,8 @@ func (m *URLMap) GetMap() map[string]interface{} { // GetMapData return all mapdata func (m *URLMap) GetMapData() []map[string]interface{} { - m.lock.Lock() - defer m.lock.Unlock() + m.lock.RLock() + defer m.lock.RUnlock() var resultLists []map[string]interface{}