<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Tor",
  "identifier" : "/documentation/Tor/TorControlClient/getBootstrapStatus()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Tor"
    ],
    "preciseIdentifier" : "s:3Tor0A13ControlClientC18getBootstrapStatusAA0eF0VSgyYaKF"
  },
  "title" : "getBootstrapStatus()"
}
-->

# getBootstrapStatus()

Fetch and parse Tor’s current bootstrap status.

```
func getBootstrapStatus() async throws -> BootstrapStatus?
```

## Return Value

A [`BootstrapStatus`](/documentation/Tor/BootstrapStatus) populated with the current
phase, or `nil` if the key is missing / unparsable.

## Discussion

Queries `GETINFO status/bootstrap-phase` (control-spec.txt
§3.9) and runs the returned value through
[`parseBootstrapStatus(_:)`](/documentation/Tor/ControlProtocolParser/parseBootstrapStatus(_:)). Returns
`nil` when Tor hasn’t yet published a bootstrap phase (rare;
typically observed immediately after [`start()`](/documentation/Tor/TorClient/start())
resolves and before the Tor thread produces its first status).

> Throws: Errors from ``doc://Tor/documentation/Tor/TorControlClient/getInfo(_:)-6m7om``.

> Note: ``doc://Tor/documentation/Tor/TorClient/waitUntilBootstrapped(timeout:)`` calls
> this method on a 1-second poll loop. Prefer the higher-level
> wait method unless you need custom polling cadence or
> progress UI.