From 41d9de8258f9234c7e47f2d61ceb0b5a0609cd6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Didrik=20Nordstr=C3=B6m?= Date: Tue, 9 Jul 2024 17:05:26 +0200 Subject: [PATCH] client: add idx to error --- client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index 65bef7d..06614d1 100644 --- a/client.go +++ b/client.go @@ -303,7 +303,9 @@ func (c *Client) broadcastQuery() error { for _, iface := range c.conn.ifaces { c.conn.SetWriteDeadline(time.Now().Add(writeTimeout)) err := c.conn.WriteMulticast(m, iface.Index, nil) - errs = append(errs, err) + if err != nil { + errs = append(errs, fmt.Errorf("idx %v: %w", iface.Index, err)) + } } return errors.Join(errs...)