Skip to content

Commit 79a3be0

Browse files
committed
fixup! STF-322: Document transport-failure retry in README and CHANGELOG
1 parent 953d4b5 commit 79a3be0

2 files changed

Lines changed: 23 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ CHANGELOG
77
* Added `FAT_ZEBRA` to the `Payment.Processor` enum.
88
* Added `CLEAR` to the `TransactionReport.Tag` enum for use with the Report
99
Transaction API.
10-
* Added `WebServiceClient.Builder.maxRetries(int)` to configure transport-failure
11-
retry behavior. Defaults to 1 (one retry on connection reset, broken pipe,
12-
or connect timeout). Set to 0 to disable. Request-phase timeouts and HTTP
13-
4xx/5xx responses are never retried.
10+
* Added `WebServiceClient.Builder.maxRetries(int)` to configure transport-
11+
failure retry behavior. Defaults to 1 (one retry on transient transport
12+
errors such as connection reset, broken pipe, EOF, or closed channel).
13+
Set to 0 to disable. `HttpTimeoutException` (covering both request-phase
14+
and connect-phase timeouts), `InterruptedIOException`, and HTTP 4xx/5xx
15+
responses are never retried.
1416

1517
4.2.0 (2026-02-26)
1618
------------------

README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,23 @@ See the API documentation for more details.
115115
`WebServiceClient` is thread-safe and reuses a pooled `HttpClient` across
116116
requests. Idle connections in the pool can be silently closed by load
117117
balancers or other intermediaries. When the next request reuses one of these
118-
half-closed connections, the JDK reports the failure as a `Connection reset`
119-
(or `Broken pipe`) `IOException`.
120-
121-
To smooth over these intermittent transport failures, the SDK retries once by
122-
default. The retry covers:
123-
124-
* `SocketException` with message `Connection reset` or `Broken pipe`,
125-
* `ConnectException`,
126-
* `HttpConnectTimeoutException`.
127-
128-
Retries are **not** applied to request-phase timeouts (`HttpTimeoutException`)
129-
or to HTTP 4xx / 5xx responses. POST bodies are replayable, so retried
130-
requests are byte-identical to the original.
118+
half-closed connections, the JDK reports the failure as a `Connection reset`,
119+
`Broken pipe`, or related transport `IOException`.
120+
121+
To smooth over these intermittent transport failures, the SDK retries once
122+
by default. Any transport-level `IOException` raised by the underlying HTTP
123+
send is retried, with two exceptions:
124+
125+
* `HttpTimeoutException` — a request-phase timeout. Connect-phase timeouts
126+
(`HttpConnectTimeoutException`) are also excluded because they extend
127+
`HttpTimeoutException`. The SDK honors the timeouts you configure.
128+
* `InterruptedIOException` — the calling thread was interrupted; the SDK
129+
honors the cancellation rather than override it.
130+
131+
HTTP 4xx and 5xx responses are not retried — they are returned as
132+
`HttpResponse` objects (not `IOException`s) and surfaced through the existing
133+
exception hierarchy. POST bodies are replayable, so retried requests are
134+
byte-identical to the original.
131135

132136
You can change the retry budget via the builder:
133137

0 commit comments

Comments
 (0)