mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-22 05:46:30 +03:00
Fix lint errors
This commit is contained in:
@@ -123,16 +123,12 @@ func (tun *TunAdapter) write() {
|
||||
continue // bad remote address/subnet
|
||||
}
|
||||
bs = buf[:TUN_OFFSET_BYTES+len(bs)]
|
||||
n, err = tun.iface.Write(bs, TUN_OFFSET_BYTES)
|
||||
if err != nil {
|
||||
if _, err = tun.iface.Write(bs, TUN_OFFSET_BYTES); err != nil {
|
||||
tun.Act(nil, func() {
|
||||
if !tun.isOpen {
|
||||
tun.log.Errorln("TUN iface write error:", err)
|
||||
}
|
||||
})
|
||||
}
|
||||
if n != len(bs) {
|
||||
// TODO some kind of error reporting for a partial write
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user