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 2025/08/05 09:33:00 UTC

[jira] [Resolved] (HTTPCLIENT-2384) Socket options related to TcpKeepAlive are ignored

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

Oleg Kalnichevski resolved HTTPCLIENT-2384.
-------------------------------------------
    Fix Version/s: 5.5.1
                   5.6-alpha1
       Resolution: Fixed

> Socket options related to TcpKeepAlive are ignored
> --------------------------------------------------
>
>                 Key: HTTPCLIENT-2384
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2384
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (async), HttpClient (classic)
>    Affects Versions: 5.5
>            Reporter: Igor Mukhin
>            Priority: Major
>             Fix For: 5.5.1, 5.6-alpha1
>
>
> SocketConfig has properties to set up TcpKeepAlive mechanism. Those are:
> {code}
> SocketConfig.tcpKeepIdle
> SocketConfig.tcpKeepInterval
> SocketConfig.tcpKeepCount
> {code}
> These properties are ignored while configuring a Socket in DefaultHttpClientConnectionOperator.connect(...). Some standard options are configured but not the tcpKeepAlive related stuff.
> We bumped into the issue after migrating from 4.5.x. In 4.5 we were able to configure a socket factory that done the socket configuration we needed. After migration, we were glad to see that tcpKeepAlive could be configured in SocketConfig. But it turned out the properties are ignored. 
> For now, we are using a workaround by creating PoolingHttpClientConnectionManager which is supplied with the custom configured DefaultHttpClientConnectionOperator which is configured with a custom DetachedSocketFactory that configures tcpKeepAlive. Obviously this is not the intended way of setting it up.



--
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