瀏覽代碼

Merge pull request #3939 from xiang90/fix_watch

storage: add missing return for unsafeAddWatching
Xiang Li 10 年之前
父節點
當前提交
14210cf8a7
共有 1 個文件被更改,包括 2 次插入1 次删除
  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 {
 			v[wa] = struct{}{}
 		}
-
+		return nil
 	}
+
 	mp[k] = make(map[*watching]struct{})
 	mp[k][wa] = struct{}{}
 	return nil