[ 
https://issues.apache.org/jira/browse/HTTPCORE-480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16111101#comment-16111101
 ] 

Oleg Kalnichevski commented on HTTPCORE-480:
--------------------------------------------

The timeout check applies to _all_ _active_ sessions managed by the I/O reactor 
all of which may have different timeout settings. If your application always 
uses the same timeout for all active sessions and it is known to be greater or 
equal to 10 min what you are proposing may make sense for your _specific_ 
application but is not generally applicable to all applications. Not to mention 
that the protocol layer can change the timeout settings at runtime for instance 
then executing 'expect-continue' handshake.

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-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to