code: public void setConnectTimeout(int timeout) {
          Assert.isTrue(timeout >= 0, "Timeout must be a non-negative value");
          this.httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(timeout);
      }
docs: Set the connection timeout for the underlying HttpClient.
  A timeout value of 0 specifies an infinite timeout.
  @param timeout the timeout value in milliseconds
  @see org.apache.commons.httpclient.params.HttpConnectionManagerParams#setConnectionTimeout(int)