receive: squelch tear down error

This commit is contained in:
Jason A. Donenfeld 2019-03-07 02:03:48 +01:00
parent 92f72f5aa6
commit 26af6c4651

View file

@ -633,7 +633,7 @@ func (peer *Peer) RoutineSequentialReceiver() {
offset := MessageTransportOffsetContent
atomic.AddUint64(&peer.stats.rxBytes, uint64(len(elem.packet)))
_, err := device.tun.device.Write(elem.buffer[:offset+len(elem.packet)], offset)
if err != nil {
if err != nil && !device.isClosed.Get() {
logError.Println("Failed to write packet to TUN device:", err)
}
}