From 26af6c4651dbba986c1d05162e9ef1906665da92 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 7 Mar 2019 02:03:48 +0100 Subject: receive: squelch tear down error --- device/receive.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'device') 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) } } -- cgit v1.2.3