wgengine/magicsock: prevent logging while running benchmarks

Co-authored-by: Sonia Appasamy <[email protected]>
Signed-off-by: Josh Bleecher Snyder <[email protected]>
This commit is contained in:
Josh Bleecher SnyderandSonia Appasamy authored and Josh Bleecher Snyder committed 2021-02-12 09:52:43 -08:00
1 parent be906dabd4
commit 4cd9218351
1 file changed
+1
+1
View File
@@ -1552,6 +1552,7 @@ func addTestEndpoint(conn *Conn, sendConn net.PacketConn) (tailcfg.NodeKey, tail
func BenchmarkReceiveFrom(b *testing.B) {
conn := newNonLegacyTestConn(b)
defer conn.Close()
conn.logf = logger.Discard
sendConn, err := net.ListenPacket("udp4", "127.0.0.1:0")
if err != nil {