5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-22 16:30:27 +00:00

comment out pointless error that prints on some platforms and not others

This commit is contained in:
Arceliar 2019-11-24 15:37:37 -06:00
parent 5f1ddbb038
commit 2e95a3131c

View File

@ -31,7 +31,7 @@ func (w *tunWriter) _write(b []byte) {
if n == 0 { if n == 0 {
return return
} }
written, err = w.tun.iface.Write(append(make([]byte, TUN_OFFSET_BYTES), b[:n]...), TUN_OFFSET_BYTES) written, err = w.tun.iface.Write(append(make([]byte, TUN_OFFSET_BYTES), b...), TUN_OFFSET_BYTES)
util.PutBytes(b) util.PutBytes(b)
if err != nil { if err != nil {
w.tun.Act(w, func() { w.tun.Act(w, func() {
@ -41,7 +41,8 @@ func (w *tunWriter) _write(b []byte) {
}) })
} }
if written != n+TUN_OFFSET_BYTES { if written != n+TUN_OFFSET_BYTES {
w.tun.log.Errorln("TUN iface write mismatch:", written, "bytes written vs", n, "bytes given") // FIXME some platforms return the wrong number of bytes written, causing error spam
//w.tun.log.Errorln("TUN iface write mismatch:", written, "bytes written vs", n+TUN_OFFSET_BYTES, "bytes given")
} }
} }