Skip to content

Commit

Permalink
Merge pull request kelseyhightower#254 from treatwell/master
Browse files Browse the repository at this point in the history
Fix "The event in requested index is outdated and cleared" error
  • Loading branch information
kelseyhightower committed Apr 9, 2015
2 parents 211a5cb + 8508a02 commit 4a8e079
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backends/etcd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ func (c *Client) WatchPrefix(prefix string, waitIndex uint64, stopChan chan bool
}
resp, err := c.client.Watch(prefix, waitIndex+1, true, nil, stopChan)
if err != nil {
switch e := err.(type) {
case *goetcd.EtcdError:
if e.ErrorCode == 401 {
return 0, nil
}
}
return waitIndex, err
}
return resp.Node.ModifiedIndex, err
Expand Down

0 comments on commit 4a8e079

Please sign in to comment.