aboutsummaryrefslogtreecommitdiffstats
path: root/device
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 /device
parenttun: linux: work out netpoll trick (diff)
downloadwireguard-go-26af6c4651dbba986c1d05162e9ef1906665da92.tar.xz
wireguard-go-26af6c4651dbba986c1d05162e9ef1906665da92.zip
receive: squelch tear down error
Diffstat (limited to 'device')
-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)
}
}