StatusLine establishConnection(Connection conn, HttpUriRequest request) {
logger.info("{} Establishing a connection", name);
// establish connection
StatusLine status = null;
try {
addEvent(new ConnectionEvent(EventType.CONNECTION_ATTEMPT, request));
status = conn.connect(request);
} catch (UnknownHostException e) {
// banking on some httpHosts.nextHost() being legitimate, or else this connection will fail.
logger.warn("{} Unknown host - {}", name, request.getURI().getHost());
addEvent(new Event(EventType.CONNECTION_ERROR, e));