* move "controlLock" mutex to "config"

This commit is contained in:
Simon Zolin
2019-07-09 18:25:26 +03:00
parent d51f43e27a
commit 2682adca39
5 changed files with 9 additions and 11 deletions

View File

@@ -35,8 +35,8 @@ func ensure(method string, handler func(http.ResponseWriter, *http.Request)) fun
}
if method == "POST" || method == "PUT" || method == "DELETE" {
controlLock.Lock()
defer controlLock.Unlock()
config.controlLock.Lock()
defer config.controlLock.Unlock()
}
handler(w, r)