server/{grpc,rpc}: fix deregister domain bug (#1742)

* server/{grpc,rpc}: fix deregister domain bug

* server/grpc: remove unnecessary slice
This commit is contained in:
ben-toogood 2020-06-25 11:25:43 +01:00 committed by GitHub
parent 51b4ab0abc
commit 5ab475636a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -794,7 +794,9 @@ func (g *grpcServer) Deregister() error {
if logger.V(logger.InfoLevel, logger.DefaultLogger) { if logger.V(logger.InfoLevel, logger.DefaultLogger) {
logger.Infof("Deregistering node: %s", node.Id) logger.Infof("Deregistering node: %s", node.Id)
} }
if err := config.Registry.Deregister(service); err != nil {
opt := registry.DeregisterDomain(g.opts.Namespace)
if err := config.Registry.Deregister(service, opt); err != nil {
return err return err
} }

View File

@ -771,7 +771,7 @@ func (s *rpcServer) Deregister() error {
if logger.V(logger.InfoLevel, logger.DefaultLogger) { if logger.V(logger.InfoLevel, logger.DefaultLogger) {
log.Infof("Registry [%s] Deregistering node: %s", config.Registry.String(), node.Id) log.Infof("Registry [%s] Deregistering node: %s", config.Registry.String(), node.Id)
} }
if err := config.Registry.Deregister(service); err != nil { if err := config.Registry.Deregister(service, registry.DeregisterDomain(s.opts.Namespace)); err != nil {
return err return err
} }