waitConnection

private suspend fun waitConnection(daemon: DaemonHost): DaemonHost

Waits for the daemon to be connected.

Return

daemon if it already connected, or a new, connected instance of LocallyTrackedDaemonHost if it is not connected.

Throws

if the Docker Engine is disconnected, and after CONNECT_DAEMON_RETRIES the connection still cannot be established.