Przeglądaj źródła

storage: add missing return for unsafeAddWatching

Xiang Li 10 lat temu
rodzic
commit
9f908ce67f
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      storage/watchable_store.go

+ 2 - 1
storage/watchable_store.go

@@ -385,8 +385,9 @@ func unsafeAddWatching(synced *map[string]map[*watching]struct{}, k string, wa *
 		} else {
 		} else {
 			v[wa] = struct{}{}
 			v[wa] = struct{}{}
 		}
 		}
-
+		return nil
 	}
 	}
+
 	mp[k] = make(map[*watching]struct{})
 	mp[k] = make(map[*watching]struct{})
 	mp[k][wa] = struct{}{}
 	mp[k][wa] = struct{}{}
 	return nil
 	return nil