mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Fix lint errors
This commit is contained in:
parent
166336a418
commit
8932ab0519
14 changed files with 44 additions and 54 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue