From ac0f3bcbd5a4e0790e17f245146a424d4b3d67bf Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Wed, 5 Aug 2020 18:09:04 +0100 Subject: [PATCH] dont process endpoint unless absolutely necessary --- registry.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/registry.go b/registry.go index 202b1b4..b4f467f 100644 --- a/registry.go +++ b/registry.go @@ -127,7 +127,10 @@ func (r *registryRouter) store(services []*registry.Service) { key := fmt.Sprintf("%s.%s", service.Name, sep.Name) // decode endpoint end := api.Decode(sep.Metadata) - + // no endpoint or no name + if end == nil || len(end.Name) == 0 { + continue + } // if we got nothing skip if err := api.Validate(end); err != nil { if logger.V(logger.TraceLevel, logger.DefaultLogger) {