http.Error(w, "unauthenticated", http.StatusUnauthorized)
return
}
- auther, ok := passwords[username]
+ PasswordsM.RLock()
+ auther, ok := Passwords[username]
+ PasswordsM.RUnlock()
if !ok || !auther.Auth(password) {
log.Println(r.RemoteAddr, "unauthenticated", username)
http.Error(w, "unauthenticated", http.StatusUnauthorized)