Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-480

improve the code in check timeout

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • 4.4.6
    • 4.4.7
    • HttpCore NIO
    • None

    Description

      change the code in org.apache.http.impl.nio.reactor.BaseIOReactor:
      if( (currentTime - this.lastTimeoutCheck) >= this.timeoutCheckInterval) ->
      if( (currentTime - this.lastTimeoutCheck) >= this.timeoutCheckInterval + 2)

      because :the code will run for a time and network tranport expend the time too. So currentTime - this.lastTimeoutCheck should be
      larger than selectTimeout in order to check timeout. In this case , This will make the code more efficiency.

      Attachments

        1. AbstractIOReactor-change.png
          37 kB
          silver9886
        2. BaseIOReactor-add class.png
          18 kB
          silver9886
        3. BaseIOReactor-change.png
          23 kB
          silver9886

        Activity

          People

            Unassigned Unassigned
            silver9886 silver9886
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: