diff --git a/store/store.go b/store/store.go index 4dbe2038a..25ab54894 100644 --- a/store/store.go +++ b/store/store.go @@ -135,6 +135,7 @@ func (s *store) Create(nodePath string, dir bool, value string, unique bool, exp e, err := s.internalCreate(nodePath, dir, value, unique, false, expireTime, Create) if err == nil { + s.WatcherHub.notify(e) s.Stats.Inc(CreateSuccess) } else { s.Stats.Inc(CreateFail) @@ -178,6 +179,8 @@ func (s *store) Set(nodePath string, dir bool, value string, expireTime time.Tim e.PrevNode = prev.Node } + s.WatcherHub.notify(e) + return e, nil } @@ -524,8 +527,6 @@ func (s *store) internalCreate(nodePath string, dir bool, value string, unique, s.CurrentIndex = nextIndex - s.WatcherHub.notify(e) - return e, nil }