Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6910

don't need setSocketTimeout when create ahc RequestConfig

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.10, 3.1.7, 3.2.0
    • Transports
    • None
    • Unknown

    Description

      currently when we create the ahc RequestConfig we set the socketTimeout as
      setSocketTimeout((int) csPolicy.getReceiveTimeout()

      this cause the created http connection controlled by the socket level timeout, that said, if there's no data on the socket in a certain time, the connection would be closed, this overrule the TTL value of a connection, which means the connection timeToLive can't be managed by a connectionPoolManager, this is really painful for heavy loaded client request as we want the connectionPoolManager to manage the connection so that we could reuse the connection.

      Fortunately in AsyncHTTPConduit

      protected synchronized HttpResponse getHttpResponse()
      

      we already handle the timeout at application level so that we needn't set that at socket level, so that let the connectionPoolManager can decide the connection TTL

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            ffang Freeman Yue Fang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: