Skip to content

Consistently treat 0 as no timeout in AsyncServerResponse #37452

Closed

Description

@sbrannen

Follow-up to #37425.

AsyncServerResponse.create(Object, Duration) handles a timeout of Duration.ZERO inconsistently. When the response is written asynchronously, the timeout is passed to DeferredResult and ultimately to the Servlet container, which treats a value of zero or less as "no timeout". However, block() passes it to CompletableFuture.get(long, TimeUnit), which fails immediately.

For consistency with the asynchronous code path, block() should treat a timeout of zero or less as "no timeout".

Activity

  1. added this to the 7.1.0-RC1 milestone on Oct 11, 2026
  2. self-assigned this
    on Oct 11, 2026
  3. added
    in: webIssues in web modules (web, webmvc, webflux, websocket)
    on Oct 11, 2026
  4. added a commit that references this issue on Oct 11, 2026
    0fce1dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions