Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Java11 Http2Client rejects documented zero connect and read timeouts

Aperta
#3,635 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@hutiefang76 ci sta già lavorando.

Dal 19/10/2026.

  • #3637 di @hutiefang76 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
java
Ambito
api, backend

Direzione di ricerca

The issue identifies Http2Client and its synchronous and asynchronous execution paths, with reproduction against a local MockWebServer; no source or test file paths are given. Start by locating the Java 11 client timeout configuration and the existing zero timeout tests. Done means zero connect and read timeouts work across the described paths, while positive timeouts and negative value rejection remain unchanged.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Request.Options.connectTimeoutMillis() and readTimeoutMillis() document 0 as no timeout, but the Java11 client passes zero durations directly to the JDK builders, which reject them.

On current master (fee42b49), a request with a zero read timeout throws IllegalArgumentException: Invalid duration: PT0S before being sent. A zero connect timeout also makes new Http2Client(options) fail. The same problem affects the synchronous and asynchronous execution paths, including a supplied native client with no connect timeout configured.

I reproduced this with the public Http2Client.execute methods against a local MockWebServer, using real Zulu 11.0.32.1 compilation and Temurin 25 test execution as required by the module's toolchains. Seven zero-timeout cases fail with IllegalArgumentException; both positive-timeout controls receive the expected HTTP response.

For example:

Options options = new Options(5000, TimeUnit.MILLISECONDS, 0, TimeUnit.MILLISECONDS, true);
Http2Client client = new Http2Client(options);
client.execute(request, options); // fails before sending the request

I am preparing a fix to omit the relevant JDK timeout setter for zero, and to treat an absent native connect timeout as matching zero. Positive timeout behavior and rejection of negative values will remain unchanged. This is separate from #3068's streaming response-body timeout question.

Lingua principale
Java
Stelle
9.8k
Fork
2k
Merge medio
13h 7m
PR unite (30g)
37

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenFeign/feign

Tutte le issue di OpenFeign/feign

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.