[
https://issues.apache.org/jira/browse/AXIS2C-1568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Lazarski resolved AXIS2C-1568.
-------------------------------------
Fix Version/s: 2.0.0
(was: 1.7.0)
Resolution: Fixed
Implement automatic reconnection when keep-alive connections timeout.
When a server closes an idle keep-alive connection, the client now:
1. Detects the timeout (status code -2)
2. Removes the stale connection from the pool
3. Retries with a new connection (max 1 retry)
Changes:
- http_client.c: Return AXIS2_HTTP_CLIENT_STATUS_TIMEOUT (-2) for timeouts
instead of generic -1 error, enabling retry logic
- http_sender.c: Add keepalive_timeout_retries counter and retry logic
that removes stale connections and retries on timeout
- axis2_http_transport.h: Define AXIS2_HTTP_CLIENT_STATUS_TIMEOUT (-2)
and AXIS2_HTTP_CLIENT_STATUS_ERROR (-1) constants
- axis2_http_sender.h: Add axis2_http_sender_set_so_timeout() and
axis2_http_sender_get_so_timeout() functions
The -2 status code is now documented:
- -1 = General error (AXIS2_HTTP_CLIENT_STATUS_ERROR)
- -2 = Connection timeout (AXIS2_HTTP_CLIENT_STATUS_TIMEOUT
> In keep alive mode, client reuses a connection even if the connection has
> already closed.
> -----------------------------------------------------------------------------------------
>
> Key: AXIS2C-1568
> URL: https://issues.apache.org/jira/browse/AXIS2C-1568
> Project: Axis2-C
> Issue Type: Bug
> Components: transport/http
> Affects Versions: 1.7.0
> Environment: no libcurl
> Reporter: Akira Suzuki
> Priority: Minor
> Fix For: 2.0.0
>
>
> In keep alive mode, client keeps and reuses connection.
> If client reuses it in short time, it works fine. If not, server may close
> the connection because of timeout and it causes an error on client side when
> client try to reuse the connection.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]