diff options
author | Filippo Valsorda <hi@filippo.io> | 2018-05-20 23:18:25 -0400 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-21 20:21:00 +0200 |
commit | 84f52ce0d690c2377b032c8fc42b591930822d7e (patch) | |
tree | 596613f3b1fed60f44e70c321cedc8b6055f8472 | |
parent | 7bdc5eb54ed7ac45016e6e028913f1594471a074 (diff) |
Make successful tests silent
License: MIT
Signed-off-by: Filippo Valsorda <valsorda@google.com>
-rw-r--r-- | device_test.go | 8 | ||||
-rw-r--r-- | send.go | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/device_test.go b/device_test.go index bafebe2..c117116 100644 --- a/device_test.go +++ b/device_test.go @@ -26,8 +26,8 @@ func TestDevice(t *testing.T) { t.Error("failed to create tun:", err.Error()) } - println(tun1) - println(tun2) + _ = tun1 + _ = tun2 // prepare endpoints @@ -41,8 +41,8 @@ func TestDevice(t *testing.T) { t.Error("failed to create endpoint:", err.Error()) } - println(end1) - println(end2) + _ = end1 + _ = end2 // create binds @@ -264,8 +264,10 @@ func (device *Device) RoutineReadFromTUN() { size, err := device.tun.device.Read(elem.buffer[:], offset) if err != nil { - logError.Println("Failed to read packet from TUN device:", err) - device.Close() + if !device.isClosed.Get() { + logError.Println("Failed to read packet from TUN device:", err) + device.Close() + } return } |