diff --git a/src/net/dial.go b/src/net/dial.go index 486ced0f2a9..9159e6b3844 100644 --- a/src/net/dial.go +++ b/src/net/dial.go @@ -421,12 +421,7 @@ func (d *Dialer) DialContext(ctx context.Context, network, address string) (Conn primaries = addrs } - var c Conn - if len(fallbacks) > 0 { - c, err = sd.dialParallel(ctx, primaries, fallbacks) - } else { - c, err = sd.dialSerial(ctx, primaries) - } + c, err := sd.dialParallel(ctx, primaries, fallbacks) if err != nil { return nil, err }