From 26580713f0a160edaa05110bd12a3a8c2c2530be Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Sun, 21 Jan 2018 22:30:51 +0100 Subject: [PATCH] cmd/mconnect-discover: adjust to changes in discovery --- cmd/mconnect-discover/main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/mconnect-discover/main.go b/cmd/mconnect-discover/main.go index d78211e..e8f9aa9 100644 --- a/cmd/mconnect-discover/main.go +++ b/cmd/mconnect-discover/main.go @@ -38,6 +38,13 @@ func main() { for { log.Printf("receive wait") - l.Receive(ctx) + d, err := l.Receive(ctx) + if err != nil { + log.Warning("failed to receive identity packet: %v", err) + continue + } + + log.Infof("discovered a device at %s packet: %v", + d.From, d.Identity) } }