Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1561

ResteasyClientBuilder socketTimeout documentation error

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor Minor
    • 3.1.0.Final, 3.0.20.Final
    • 3.0.19.Final
    • None
    • None

      There is an error in the documentation of org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder#socketTimeout
      It reads:

          * Socket inactivity timeout
      

      However, the implementation sets org.apache.commons.httpclient.params.HttpConnectionParams#setSoTimeout

      if (socketTimeout > -1)
               {
                  HttpConnectionParams.setSoTimeout(params, (int) socketTimeoutUnits.toMillis(socketTimeout));
      
               }
      

      and its documentation reads:

           * Sets the default socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the 
           * timeout for waiting for data. A timeout value of zero is interpreted as an infinite 
           * timeout. This value is used when no socket timeout is set in the 
           * {@link HttpMethodParams HTTP method parameters}. 
      

      So in fact it sets the amount of time to wait for data, not a timeout for socket inactivity.

            rhn-support-asoldano Alessio Soldano
            aviemzur Aviem Zur (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: