hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HTTPCORE-480) improve the code in check timeout
Date Wed, 02 Aug 2017 14:40:02 GMT

     [ https://issues.apache.org/jira/browse/HTTPCORE-480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oleg Kalnichevski resolved HTTPCORE-480.
----------------------------------------
    Resolution: Invalid

With a reasonable value of timeoutCheckInterval, which is 1000 ms by default, the check is
performed only after timeoutCheckInterval ms have elapsed since the last check, that is no
often than 1 second. If you want to reduce frequency of the timeout check you can just increase
timeoutCheckInterval.

Oleg 

> improve the code in check timeout
> ---------------------------------
>
>                 Key: HTTPCORE-480
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-480
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore NIO
>    Affects Versions: 4.4.6
>            Reporter: silver9886
>            Priority: Minor
>             Fix For: 4.4.7
>
>         Attachments: AbstractIOReactor-change.png, BaseIOReactor-add class.png, BaseIOReactor-change.png
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message