wgengine/magicsock: prevent logging after TestActiveDiscovery completes
This commit is contained in:
parent
12bb949178
commit
ed2169ae99
|
@ -835,11 +835,13 @@ func testActiveDiscovery(t *testing.T, d *devices) {
|
||||||
setT(t)
|
setT(t)
|
||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
logf := func(msg string, args ...interface{}) {
|
wlogf := func(msg string, args ...interface{}) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
msg = fmt.Sprintf("%s: %s", time.Since(start).Truncate(time.Microsecond), msg)
|
msg = fmt.Sprintf("%s: %s", time.Since(start).Truncate(time.Microsecond), msg)
|
||||||
tlogf(msg, args...)
|
tlogf(msg, args...)
|
||||||
}
|
}
|
||||||
|
logf, closeLogf := logger.LogfCloser(wlogf)
|
||||||
|
defer closeLogf()
|
||||||
|
|
||||||
derpMap, cleanup := runDERPAndStun(t, logf, d.stun, d.stunIP)
|
derpMap, cleanup := runDERPAndStun(t, logf, d.stun, d.stunIP)
|
||||||
defer cleanup()
|
defer cleanup()
|
||||||
|
|
Loading…
Reference in New Issue