do some todos
This commit is contained in:
parent
ac9e341b58
commit
0c6df5d6cf
1 changed files with 7 additions and 5 deletions
|
|
@ -294,7 +294,6 @@ func (r *LuxRouter) Recv() (LuxPacket, error) {
|
|||
key, _ := r.GetRouteKey(route)
|
||||
packet, err = DecryptLuxPacket(dgram, key)
|
||||
if err != nil {
|
||||
// do we really fail here?
|
||||
log.Debugf("DecryptLuxPacket err %v for route %v", err, route)
|
||||
return packet, err
|
||||
}
|
||||
|
|
@ -388,8 +387,11 @@ func (r *LuxRouter) Send(packet LuxPacket) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// TODO: close route if it fails?
|
||||
return route.Associated.Send(dgram)
|
||||
if err := route.Associated.Send(dgram); err != nil {
|
||||
log.Warningf("multicast to %s failed: %v", dgram.Target, err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// In multicast we send packet to all routes by group. Group is lux peer type
|
||||
|
|
@ -408,8 +410,8 @@ func (r *LuxRouter) Multicast(packet LuxPacket, group proto.LuxType) error {
|
|||
}
|
||||
|
||||
if err = route.Associated.Send(dgram); err != nil {
|
||||
// TODO: close route if it fails?
|
||||
return err
|
||||
log.Warningf("multicast to %s failed: %v", dgram.Target, err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue