From a42de29f6749c5860ac9c46e3e45c772e521ea3b Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Thu, 15 Aug 2019 08:59:50 +0100 Subject: [PATCH] Do same for host port on deregister --- server/rpc_server.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/rpc_server.go b/server/rpc_server.go index c6576a71..516825db 100644 --- a/server/rpc_server.go +++ b/server/rpc_server.go @@ -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 := ®istry.Node{ Id: config.Name + "-" + config.Id, - Address: mnet.HostPort(addr, port), + Address: addr, } service := ®istry.Service{