Explorar el Código

Fix Unlock of unlocked RWMutex when removing a host from a host policy

Matt Heath hace 10 años
padre
commit
e89ce0fd07
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      policies.go

+ 1 - 1
policies.go

@@ -450,7 +450,7 @@ func (r *hostPoolHostPolicy) AddHost(host *HostInfo) {
 }
 
 func (r *hostPoolHostPolicy) RemoveHost(addr string) {
-	r.mu.Unlock()
+	r.mu.Lock()
 	defer r.mu.Unlock()
 
 	if _, ok := r.hostMap[addr]; !ok {