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

Oleg Kalnichevski resolved HTTPCLIENT-2262.
-------------------------------------------
    Resolution: Information Provided

> Clarify infinite timeout vs disabled timeout
> --------------------------------------------
>
>                 Key: HTTPCLIENT-2262
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2262
>             Project: HttpComponents HttpClient
>          Issue Type: Task
>          Components: HttpClient (classic)
>    Affects Versions: 5.2.1
>            Reporter: Nicolas Filotto
>            Priority: Major
>
> I have a question regarding the expected behavior when setting a timeout to 
> 0. 
> In HttpClient, If I read for example [the Javadoc of the 
> {{connectionRequestTimeout}}|https://github.com/apache/httpcomponents-client/blob/master/httpclient5/src/main/java/org/apache/hc/client5/http/config/RequestConfig.java#L427],
>  it tells me that a timeout of 0 is infinite.
> In HttpCore, If I read [the Javadoc of 
> {{Timeout#DISABLED}}|https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/main/java/org/apache/hc/core5/util/Timeout.java#L58],
>  it tells me that the timeout is simply disabled when set to 0 but what 
> disabled means precisely?
> If I keep digging in HttpCore, I see several classes like {{StrictConnPool}} 
> that leverage {{Future}} and {{Lock}} for which a timeout set to 0, means 
> that we expect an immediate result either with a success or a 
> {{TimeoutException}}, so I assume that it is what "disabled timeout" means 
> but if so it would be in conflict with an infinite timeout as I personally 
> don't expect to get a {{TimeoutException}} in case of an infinite timeout but 
> maybe I'm wrong and it just needs to be clarified?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to