Skip to content

Commit

Permalink
Merge pull request #643 from travisn/rebuild-pool-watch
Browse files Browse the repository at this point in the history
Reset the pool tpr watch index on failure
  • Loading branch information
travisn committed May 3, 2017
2 parents 96b886c + 7d08447 commit e01d34f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/operator/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ func (p *poolManager) watchOuterTPR(eventCh chan *poolEvent, errCh chan error) e
decoder := json.NewDecoder(resp.Body)
for {
ev, st, err := pollPoolEvent(decoder)
done, err := handlePollEventResult(st, err, func() (bool, error) { return false, nil }, errCh)
done, err := handlePollEventResult(st, err, func() (bool, error) {
// there is no cache for the pool tpr, so we return true to indicate to always reset the watch on error
return true, nil
}, errCh)
if err != nil {
return err
}
Expand Down

0 comments on commit e01d34f

Please sign in to comment.