Commit 6ad88bb1 authored by Brendan Burns's avatar Brendan Burns

Clear resourceVersion on errors.

parent 21b661ec
...@@ -127,9 +127,11 @@ func handleServicesWatch(resourceVersion *string, ch <-chan watch.Event, updates ...@@ -127,9 +127,11 @@ func handleServicesWatch(resourceVersion *string, ch <-chan watch.Event, updates
service = obj service = obj
case *api.Status: case *api.Status:
glog.Warningf("Got error status on WatchServices channel: %+v", obj) glog.Warningf("Got error status on WatchServices channel: %+v", obj)
*resourceVersion = ""
return return
default: default:
glog.Errorf("Got unexpected object over WatchServices channel: %+v", obj) glog.Errorf("Got unexpected object over WatchServices channel: %+v", obj)
*resourceVersion = ""
return return
} }
...@@ -196,9 +198,11 @@ func handleEndpointsWatch(resourceVersion *string, ch <-chan watch.Event, update ...@@ -196,9 +198,11 @@ func handleEndpointsWatch(resourceVersion *string, ch <-chan watch.Event, update
endpoints = obj endpoints = obj
case *api.Status: case *api.Status:
glog.Warningf("Got error status on WatchEndpoints channel: %+v", obj) glog.Warningf("Got error status on WatchEndpoints channel: %+v", obj)
*resourceVersion = ""
return return
default: default:
glog.Errorf("Got unexpected object over WatchEndpoints channel: %+v", obj) glog.Errorf("Got unexpected object over WatchEndpoints channel: %+v", obj)
*resourceVersion = ""
return return
} }
*resourceVersion = endpoints.ResourceVersion *resourceVersion = endpoints.ResourceVersion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment