mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2025-06-05 04:43:44 +02:00
Make successful tests silent
License: MIT Signed-off-by: Filippo Valsorda <valsorda@google.com>
This commit is contained in:
parent
7bdc5eb54e
commit
84f52ce0d6
2 changed files with 8 additions and 6 deletions
|
@ -26,8 +26,8 @@ func TestDevice(t *testing.T) {
|
||||||
t.Error("failed to create tun:", err.Error())
|
t.Error("failed to create tun:", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
println(tun1)
|
_ = tun1
|
||||||
println(tun2)
|
_ = tun2
|
||||||
|
|
||||||
// prepare endpoints
|
// prepare endpoints
|
||||||
|
|
||||||
|
@ -41,8 +41,8 @@ func TestDevice(t *testing.T) {
|
||||||
t.Error("failed to create endpoint:", err.Error())
|
t.Error("failed to create endpoint:", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
println(end1)
|
_ = end1
|
||||||
println(end2)
|
_ = end2
|
||||||
|
|
||||||
// create binds
|
// create binds
|
||||||
|
|
||||||
|
|
6
send.go
6
send.go
|
@ -264,8 +264,10 @@ func (device *Device) RoutineReadFromTUN() {
|
||||||
size, err := device.tun.device.Read(elem.buffer[:], offset)
|
size, err := device.tun.device.Read(elem.buffer[:], offset)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logError.Println("Failed to read packet from TUN device:", err)
|
if !device.isClosed.Get() {
|
||||||
device.Close()
|
logError.Println("Failed to read packet from TUN device:", err)
|
||||||
|
device.Close()
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue