Skip to content

Commit

Permalink
Clear resourceVersion on errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
brendandburns committed Jan 12, 2015
1 parent 21b661e commit 6ad88bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/proxy/config/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ func handleServicesWatch(resourceVersion *string, ch <-chan watch.Event, updates
service = obj
case *api.Status:
glog.Warningf("Got error status on WatchServices channel: %+v", obj)
*resourceVersion = ""
return
default:
glog.Errorf("Got unexpected object over WatchServices channel: %+v", obj)
*resourceVersion = ""
return
}

Expand Down Expand Up @@ -196,9 +198,11 @@ func handleEndpointsWatch(resourceVersion *string, ch <-chan watch.Event, update
endpoints = obj
case *api.Status:
glog.Warningf("Got error status on WatchEndpoints channel: %+v", obj)
*resourceVersion = ""
return
default:
glog.Errorf("Got unexpected object over WatchEndpoints channel: %+v", obj)
*resourceVersion = ""
return
}
*resourceVersion = endpoints.ResourceVersion
Expand Down

0 comments on commit 6ad88bb

Please sign in to comment.