Kaynağa Gözat

Rename rwMutex to updateMutex

tags/v2.1.3^2
9seconds 4 yıl önce
ebeveyn
işleme
cc101c9a47
1 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. 5
    5
      ipblocklist/firehol.go

+ 5
- 5
ipblocklist/firehol.go Dosyayı Görüntüle

45
 	ctxCancel context.CancelFunc
45
 	ctxCancel context.CancelFunc
46
 	logger    mtglib.Logger
46
 	logger    mtglib.Logger
47
 
47
 
48
-	rwMutex sync.RWMutex
48
+	updateMutex sync.RWMutex
49
 
49
 
50
 	remoteURLs []string
50
 	remoteURLs []string
51
 	localFiles []string
51
 	localFiles []string
68
 		return true
68
 		return true
69
 	}
69
 	}
70
 
70
 
71
-	f.rwMutex.RLock()
72
-	defer f.rwMutex.RUnlock()
71
+	f.updateMutex.RLock()
72
+	defer f.updateMutex.RUnlock()
73
 
73
 
74
 	if ip4 := ip.To4(); ip4 != nil {
74
 	if ip4 := ip.To4(); ip4 != nil {
75
 		return f.containsIPv4(ip4)
75
 		return f.containsIPv4(ip4)
194
 	default:
194
 	default:
195
 	}
195
 	}
196
 
196
 
197
-	f.rwMutex.Lock()
198
-	defer f.rwMutex.Unlock()
197
+	f.updateMutex.Lock()
198
+	defer f.updateMutex.Unlock()
199
 
199
 
200
 	f.treeV4 = v4tree
200
 	f.treeV4 = v4tree
201
 	f.treeV6 = v6tree
201
 	f.treeV6 = v6tree

Loading…
İptal
Kaydet