wgengine/magicsock: in STUN-disabled test mode, let endpoint discovery proceed

This commit is contained in:
Brad Fitzpatrick 2020-03-10 11:35:43 -07:00
parent 5c1e443d34
commit a265d7cbff

View File

@ -294,7 +294,7 @@ func (c *Conn) epUpdate(ctx context.Context) {
func (c *Conn) updateNetInfo(ctx context.Context) (*netcheck.Report, error) {
if DisableSTUNForTesting {
return nil, errors.New("STUN disabled for testing")
return new(netcheck.Report), nil
}
ctx, cancel := context.WithTimeout(ctx, 2*time.Second)