registry/mdns: add logging for invalid endpoint
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
		| @@ -11,6 +11,7 @@ import ( | |||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	"github.com/google/uuid" | 	"github.com/google/uuid" | ||||||
|  | 	log "github.com/micro/go-micro/v2/logger" | ||||||
| 	"github.com/micro/mdns" | 	"github.com/micro/mdns" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -277,7 +278,7 @@ func (m *mdnsRegistry) GetService(service string) ([]*Service, error) { | |||||||
| 				} else if e.AddrV6 != nil { | 				} else if e.AddrV6 != nil { | ||||||
| 					addr = "[" + e.AddrV6.String() + "]" | 					addr = "[" + e.AddrV6.String() + "]" | ||||||
| 				} else { | 				} else { | ||||||
| 					// broken endpoint | 					log.Infof("[mdns]: invalid endpoint received: %v", e) | ||||||
| 					continue | 					continue | ||||||
| 				} | 				} | ||||||
| 				s.Nodes = append(s.Nodes, &Node{ | 				s.Nodes = append(s.Nodes, &Node{ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user