diff --git a/pkg/registry/common/clientconn/nse_client.go b/pkg/registry/common/clientconn/nse_client.go index 569dfa42a..98df904bf 100644 --- a/pkg/registry/common/clientconn/nse_client.go +++ b/pkg/registry/common/clientconn/nse_client.go @@ -40,7 +40,7 @@ func (c *clientConnNSEClient) Register(ctx context.Context, in *registry.Network func (c *clientConnNSEClient) Unregister(ctx context.Context, in *registry.NetworkServiceEndpoint, opts ...grpc.CallOption) (*empty.Empty, error) { ctx = withClientConnMetadata(ctx, &c.Map, in.GetName()) - return next.NetworkServiceEndpointRegistryClient(ctx).Unregister(ctx, in) + return next.NetworkServiceEndpointRegistryClient(ctx).Unregister(ctx, in, opts...) } func (c *clientConnNSEClient) Find(ctx context.Context, in *registry.NetworkServiceEndpointQuery, opts ...grpc.CallOption) (registry.NetworkServiceEndpointRegistry_FindClient, error) { diff --git a/pkg/registry/common/localbypass/server.go b/pkg/registry/common/localbypass/server.go index e24d663ee..4f7e19ba0 100644 --- a/pkg/registry/common/localbypass/server.go +++ b/pkg/registry/common/localbypass/server.go @@ -104,8 +104,9 @@ func (s *localBypassNSEServer) Unregister(ctx context.Context, nse *registry.Net nse.Url = s.nsmgrURL _, err = next.NetworkServiceEndpointRegistryServer(ctx).Unregister(ctx, nse) - - s.nseURLs.Delete(nse.Name) + if err == nil { + s.nseURLs.Delete(nse.Name) + } } return new(empty.Empty), err }