mirror of
https://github.com/go-micro/go-micro.git
synced 2024-11-24 08:02:32 +02:00
web: fix advertise address (#1608)
* web: fix advertise address * web: fix test Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> Co-authored-by: Asim Aslam <asim@aslam.me> Co-authored-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
f062013a7b
commit
d61df6363b
@ -63,7 +63,7 @@ func (s *service) genSrv() *registry.Service {
|
||||
// if it exists then use it, otherwise
|
||||
// use the address
|
||||
if len(s.opts.Advertise) > 0 {
|
||||
host, port, err = net.SplitHostPort(s.opts.Address)
|
||||
host, port, err = net.SplitHostPort(s.opts.Advertise)
|
||||
if err != nil {
|
||||
logger.Fatal(err)
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ func TestOptions(t *testing.T) {
|
||||
id = "service-id"
|
||||
version = "service-version"
|
||||
address = "service-addr:8080"
|
||||
advertise = "service-adv"
|
||||
advertise = "service-adv:8080"
|
||||
reg = memory.NewRegistry()
|
||||
registerTTL = 123 * time.Second
|
||||
registerInterval = 456 * time.Second
|
||||
|
Loading…
Reference in New Issue
Block a user