} catch (InterruptedException e) {
throw UncheckedException.throwAsUncheckedException(e);
}
} while (System.currentTimeMillis() < expiry);
throw new DaemonConnectionException("Timeout waiting to connect to the Gradle daemon.\n" + startupInfo.describe());
}
private DaemonClientConnection connectToDaemonWithId(DaemonStartupInfo daemon, ExplainingSpec<DaemonContext> constraint) throws ConnectException {
// Look for 'our' daemon among the busy daemons - a daemon will start in busy state so that nobody else will grab it.
for (DaemonInfo daemonInfo : daemonRegistry.getBusy()) {