Skip to content

Commit ae49efe

Browse files
authored
fix: ignore update messages from itself (#23)
* fix: ignore update messages from itself * revert unit test
1 parent bb800b6 commit ae49efe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

watcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func (w *Watcher) Update() error {
109109
w.lock.Lock()
110110
defer w.lock.Unlock()
111111
resp, err := w.client.Put(context.TODO(), w.keyName, "")
112-
if err != nil {
112+
if err == nil {
113113
w.lastSentRev = resp.Header.GetRevision()
114114
}
115115
return err

0 commit comments

Comments
 (0)