summary refs log tree commit diff stats
path: root/svc/cache.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-06-13 20:18:05 -0400
committerBen Morrison <ben@gbmor.dev>2019-06-13 20:18:10 -0400
commit9c90526a24f32a00ad35073a09839189eb8aa007 (patch)
treecd8aa746d88512bb44a1c8e69f73a4e63e7af772 /svc/cache.go
parent88dbd876a9635fa515ed29875816d05975272597 (diff)
downloadgetwtxt-9c90526a24f32a00ad35073a09839189eb8aa007.tar.gz
removed mutex from remoteRegistries
slices are safe to use concurrently already.
leaving as a struct for possible expansion later.
Diffstat (limited to 'svc/cache.go')
-rw-r--r--svc/cache.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/svc/cache.go b/svc/cache.go
index 7bad078..c51478b 100644
--- a/svc/cache.go
+++ b/svc/cache.go
@@ -20,7 +20,6 @@ import (
 // periodically scrape for new users. The remote registries
 // must have been added via POST like a user.
 type RemoteRegistries struct {
-	Mu   sync.RWMutex
 	List []string
 }
 
@@ -59,11 +58,9 @@ func cacheUpdate() {
 	}
 	twtxtCache.Mu.RUnlock()
 
-	remoteRegistries.Mu.RLock()
 	for _, v := range remoteRegistries.List {
 		errLog("Error refreshing local copy of remote registry data: ", twtxtCache.CrawlRemoteRegistry(v))
 	}
-	remoteRegistries.Mu.RUnlock()
 }
 
 // pingAssets checks if the local static assets