Log error on WriteToUDP

This commit is contained in:
Julian Kornberger 2016-03-07 01:37:07 +01:00
parent 14b849b987
commit c416386683

View File

@ -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) {