mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
Fix TCP address and port on service check registration
This commit is contained in:
parent
1599d717af
commit
f4cdfaf27f
@ -172,7 +172,7 @@ func (c *consulRegistry) Register(s *Service, opts ...RegisterOption) error {
|
||||
deregTTL := getDeregisterTTL(options.Interval)
|
||||
|
||||
check = &consul.AgentServiceCheck{
|
||||
TCP: c.Address,
|
||||
TCP: fmt.Sprintf("%s:%d", node.Address, node.Port),
|
||||
Interval: fmt.Sprintf("%v", options.Interval),
|
||||
DeregisterCriticalServiceAfter: fmt.Sprintf("%v", deregTTL),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user