router/registry: fix registry not found bug (#1794)
This commit is contained in:
parent
f744c6248f
commit
c817f29d6e
@ -183,7 +183,9 @@ func (r *router) manageRegistryRoutes(reg registry.Registry, action string) erro
|
|||||||
// fetchRoutes retrieves all the routes for a given service and creates them in the routing table
|
// fetchRoutes retrieves all the routes for a given service and creates them in the routing table
|
||||||
func (r *router) fetchRoutes(service string) error {
|
func (r *router) fetchRoutes(service string) error {
|
||||||
services, err := r.options.Registry.GetService(service, registry.GetDomain(registry.WildcardDomain))
|
services, err := r.options.Registry.GetService(service, registry.GetDomain(registry.WildcardDomain))
|
||||||
if err != nil {
|
if err == registry.ErrNotFound {
|
||||||
|
return nil
|
||||||
|
} else if err != nil {
|
||||||
return fmt.Errorf("failed getting services: %v", err)
|
return fmt.Errorf("failed getting services: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user