Ver Fonte

fixing deadlock

reid há 2 anos atrás
pai
commit
f29494af53
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      broadcast/broadcast.go

+ 1 - 0
broadcast/broadcast.go

@@ -232,6 +232,7 @@ func GetContainerNetworks(containers []string) map[string]string {
 // update broadcastState with a map of items
 func UpdateBroadcastState(values map[string]interface{}) error {
 	mu.Lock()
+	defer mu.Unlock()
 	v := reflect.ValueOf(&broadcastState).Elem()
 	for key, value := range values {
 		field := v.FieldByName(key)