summary refs log tree commit diff stats
path: root/svc/post.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/post.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/post.go')
-rw-r--r--svc/post.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/svc/post.go b/svc/post.go
index 9050859..34ae92f 100644
--- a/svc/post.go
+++ b/svc/post.go
@@ -35,9 +35,7 @@ func apiPostUser(w http.ResponseWriter, r *http.Request) {
 
 	switch remoteRegistry {
 	case true:
-		remoteRegistries.Mu.Lock()
 		remoteRegistries.List = append(remoteRegistries.List, urls)
-		remoteRegistries.Mu.Unlock()
 
 		if err := twtxtCache.CrawlRemoteRegistry(urls); err != nil {
 			errHTTP(w, r, fmt.Errorf("error crawling remote registry: %v", err.Error()), http.StatusInternalServerError)