From cc101c9a47c868967c29e4271b9e5faf4e73173b Mon Sep 17 00:00:00 2001 From: 9seconds Date: Mon, 29 Nov 2021 15:58:14 +0300 Subject: [PATCH] Rename rwMutex to updateMutex --- ipblocklist/firehol.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ipblocklist/firehol.go b/ipblocklist/firehol.go index 828afe0..23f4cdd 100644 --- a/ipblocklist/firehol.go +++ b/ipblocklist/firehol.go @@ -45,7 +45,7 @@ type Firehol struct { ctxCancel context.CancelFunc logger mtglib.Logger - rwMutex sync.RWMutex + updateMutex sync.RWMutex remoteURLs []string localFiles []string @@ -68,8 +68,8 @@ func (f *Firehol) Contains(ip net.IP) bool { return true } - f.rwMutex.RLock() - defer f.rwMutex.RUnlock() + f.updateMutex.RLock() + defer f.updateMutex.RUnlock() if ip4 := ip.To4(); ip4 != nil { return f.containsIPv4(ip4) @@ -194,8 +194,8 @@ func (f *Firehol) update() error { // nolint: funlen, cyclop default: } - f.rwMutex.Lock() - defer f.rwMutex.Unlock() + f.updateMutex.Lock() + defer f.updateMutex.Unlock() f.treeV4 = v4tree f.treeV6 = v6tree