Handle error from XDR marshalling

This commit is contained in:
Jakob Borg 2014-10-21 08:48:51 +02:00
parent bfba18fdcb
commit 962eaa8a4b

View File

@ -288,7 +288,11 @@ func handleQueryV2(db *leveldb.DB, conn *net.UDPConn, addr *net.UDPAddr, buf []b
return nil
}
tb := ann.MarshalXDR()
tb, err := ann.MarshalXDR()
if err != nil {
log.Println("QueryV2 response marshal:", err)
return nil
}
_, err = conn.WriteToUDP(tb, addr)
if err != nil {
log.Println("QueryV2 response write:", err)