fix the deadlock

This commit is contained in:
Mayuresh Gaitonde
2021-10-18 15:50:13 -07:00
parent e32ff1d52c
commit 6fdff28716
2 changed files with 11 additions and 11 deletions

View File

@@ -68,9 +68,7 @@ func (s *Server) unregisterHandler(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Invalid request, need app name specified", http.StatusBadRequest)
return
}
s.mon.Lock()
s.mon.Remove(appName[0])
s.mon.Unlock()
}
func (s *Server) infoHandler(w http.ResponseWriter, r *http.Request) {