diff --git a/respond/collector.go b/respond/collector.go index 73c02e6..4b738b9 100644 --- a/respond/collector.go +++ b/respond/collector.go @@ -78,7 +78,9 @@ func (coll *Collector) sendPacket(address string) { log.Panic(err) } - coll.connection.WriteToUDP([]byte(coll.CollectType), addr) + if _, err := coll.connection.WriteToUDP([]byte(coll.CollectType), addr); err != nil { + log.Println("WriteToUDP failed:", err) + } } func (coll *Collector) sender(collectInterval time.Duration) {