closeAndJoin

open suspend fun closeAndJoin()

Closes the underlying HTTP client and suspends until its coroutine scope completes.

Prefer this over close when called from a coroutine context: it avoids blocking the calling thread while in-flight requests and the engine's internal coroutines finish.

The client cannot be reused after closeAndJoin is called.