You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Jira)" <ji...@apache.org> on 2023/06/16 09:34:00 UTC

[jira] [Commented] (HTTPCORE-752) Idle timeout on HTTPS connection does not work

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

Oleg Kalnichevski commented on HTTPCORE-752:
--------------------------------------------

[~icruz] Please understand one simple thing: timeouts are not absolute values, timeouts define the longest period of inactivity between consecutive i/o operations. 

Please provide a test app reproducing the defect. Otherwise I will have to close the ticket as invalid.

Oleg

> Idle timeout on HTTPS connection does not work
> ----------------------------------------------
>
>                 Key: HTTPCORE-752
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-752
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 5.2.1
>            Reporter: Isaac Cruz Ballesteros
>            Priority: Major
>         Attachments: httpsTimeout.zip
>
>
> I'm having issues trying to set an idle timeout on https connections on an asynchronous HTTPS server. This is what I'm doing:
> {code:java}
>          IOReactorConfig ioReactorConfig = IOReactorConfig.custom()
>                  .setIoThreadCount(4)
>                  .setSoTimeout(5000, TimeUnit.MILLISECONDS)
>                  .setTcpNoDelay(false)
>                  .setSoReuseAddress(true)
>                  .setBacklogSize(0)
>                  .build(); {code}
> And passing that ioReactorConfig to DefaultListeningIOReactor, and an IOSessionListener to be notified of timed out connections.
> So the thing is, for plain http connections, that timeout works (my listener is called after 5 seconds, when the other end stops sending data), but on https connections, it does not work, and I need connections to be closed.
> Attached maven project that reproduces this issue.
> Class TestHttpsTimeout has a main() method that initializes the HTTPS server, using httpcore, and then acts as a HTTPS client that stops sending data after sending 25000 out of 50000 bytes (line 141). At this point I'm unable to detect this idle connection from server side.



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

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