Do same for host port on deregister

This commit is contained in:
Asim Aslam 2019-08-15 08:59:50 +01:00
parent 0f6d09af33
commit a42de29f67

View File

@ -453,9 +453,14 @@ func (s *rpcServer) Deregister() error {
return err
}
// mq-rpc(eg. nats) doesn't need the port. its addr is queue name.
if port != "" {
addr = mnet.HostPort(addr, port)
}
node := &registry.Node{
Id: config.Name + "-" + config.Id,
Address: mnet.HostPort(addr, port),
Address: addr,
}
service := &registry.Service{