Merge pull request #3803 from yinggaozhen/fix-statistics

GetMapData change to read lock
This commit is contained in:
Ming Deng 2020-06-23 21:08:32 +08:00 committed by GitHub
commit 43a3623f51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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{}