registry/mdns: add logging for invalid endpoint

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2020-03-07 23:19:48 +03:00
parent 55c19afb0b
commit 8ecbdc1cd6

View File

@ -11,6 +11,7 @@ import (
"time"
"github.com/google/uuid"
log "github.com/micro/go-micro/v2/logger"
"github.com/micro/mdns"
)
@ -277,7 +278,7 @@ func (m *mdnsRegistry) GetService(service string) ([]*Service, error) {
} else if e.AddrV6 != nil {
addr = "[" + e.AddrV6.String() + "]"
} else {
// broken endpoint
log.Infof("[mdns]: invalid endpoint received: %v", e)
continue
}
s.Nodes = append(s.Nodes, &Node{