aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/delete.go
diff options
context:
space:
mode:
authorMitchell <mitch@riedstra.dev>2021-01-12 20:53:02 -0500
committerMitchell <mitch@riedstra.dev>2021-01-12 20:53:02 -0500
commit9b04f4ca1c2fe470a562be4b075d48d1c18962da (patch)
tree7cb3b465eec5bde3de88d826880d2cc625eff005 /cmd/web/delete.go
parentfde64077cdd85f7a7b989fef320bf7fa3826a01d (diff)
downloadsteam-export-9b04f4ca1c2fe470a562be4b075d48d1c18962da.tar.gz
steam-export-9b04f4ca1c2fe470a562be4b075d48d1c18962da.tar.xz
Remove the rwmutex from the steam library as the template may be mutating the map causing issues. Embed the mutexes.
Diffstat (limited to 'cmd/web/delete.go')
-rw-r--r--cmd/web/delete.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/web/delete.go b/cmd/web/delete.go
index 8edd6c6..49a1326 100644
--- a/cmd/web/delete.go
+++ b/cmd/web/delete.go
@@ -25,9 +25,9 @@ func gameDelete(w http.ResponseWriter, r *http.Request) {
return
}
- libMu.RLock()
+ Lib.Lock()
g, ok := Lib.Games[game]
- libMu.RUnlock()
+ Lib.Unlock()
if !ok {
Logger.Printf("Missing: %s", game)
http.Error(w, "Game is missing", 404)