diff --git a/pkg/proxy/config/config.go b/pkg/proxy/config/config.go index 40c6ce9f41a..1c0e540a68b 100644 --- a/pkg/proxy/config/config.go +++ b/pkg/proxy/config/config.go @@ -129,7 +129,7 @@ func (c *EndpointSliceConfig) handleAddEndpointSlice(obj interface{}) { func (c *EndpointSliceConfig) handleUpdateEndpointSlice(oldObj, newObj interface{}) { oldEndpointSlice, ok := oldObj.(*discoveryv1.EndpointSlice) if !ok { - utilruntime.HandleError(fmt.Errorf("unexpected object type: %T", newObj)) + utilruntime.HandleError(fmt.Errorf("unexpected object type: %T", oldObj)) return } newEndpointSlice, ok := newObj.(*discoveryv1.EndpointSlice)