router/registry: fix registry not found bug (#1794)

This commit is contained in:
ben-toogood 2020-07-03 13:35:59 +01:00 committed by GitHub
parent f744c6248f
commit c817f29d6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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