From 6ad88bb143c59e4e002e32321333b8440dbc39f9 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Mon, 12 Jan 2015 11:45:38 -0800 Subject: [PATCH] Clear resourceVersion on errors. --- pkg/proxy/config/api.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/proxy/config/api.go b/pkg/proxy/config/api.go index 87ce0902472..029e2cfd259 100644 --- a/pkg/proxy/config/api.go +++ b/pkg/proxy/config/api.go @@ -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 } @@ -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