1
0
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:
Shulhan 2018-03-19 20:34:12 +07:00
parent 1599d717af
commit f4cdfaf27f

View File

@ -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),
}