summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-03-07 02:03:48 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-03-07 02:03:48 +0100
commit26af6c4651dbba986c1d05162e9ef1906665da92 (patch)
tree199a2970878ea1aff7f05ab294275cf411cd9c15
parent92f72f5aa66d49cd36822fd3b973896e43a68d3e (diff)
receive: squelch tear down error
-rw-r--r--device/receive.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/device/receive.go b/device/receive.go
index 5c837c1..09fae59 100644
--- a/device/receive.go
+++ b/device/receive.go
@@ -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)
}
}