Instance Method
shutdown()
Ask Tor to exit cleanly (SIGNAL SHUTDOWN).
func shutdown() async throws
Mentioned In
Discussion
Tor finishes in-flight requests, tears down circuits, and exits. Called by stop() before its 10-second join window. Callers should not invoke this directly unless they own the Tor lifecycle outside swift-tor (e.g. driving an external tor daemon).
Throws
TorError.controlProtocolError(code:message:) on rejection.
Important
Tor’s ShutdownWaitLength (default 30 seconds) controls the grace period for in-flight requests; swift-tor shortens the wait to 10 s at the stop() level so shutdown is bounded for UIs.