Skip to content

Commit

Permalink
fix: ignore update messages from itself (#23)
Browse files Browse the repository at this point in the history
* fix: ignore update messages from itself

* revert unit test
  • Loading branch information
sasakiyori authored Dec 1, 2022
1 parent bb800b6 commit ae49efe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (w *Watcher) Update() error {
w.lock.Lock()
defer w.lock.Unlock()
resp, err := w.client.Put(context.TODO(), w.keyName, "")
if err != nil {
if err == nil {
w.lastSentRev = resp.Header.GetRevision()
}
return err
Expand Down

0 comments on commit ae49efe

Please sign in to comment.