Skip to content

Comments

Fix #434: REST client default timeouts#435

Open
banterCZ wants to merge 2 commits intodevelopfrom
issues/434-default-timeouts
Open

Fix #434: REST client default timeouts#435
banterCZ wants to merge 2 commits intodevelopfrom
issues/434-default-timeouts

Conversation

@banterCZ
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the REST client’s configuration defaults to enforce sensible timeouts by default, addressing issue #434 and reducing the chance of indefinitely hanging requests/connections.

Changes:

  • Set a default responseTimeout (60 seconds) instead of leaving it unset.
  • Set default connection pool eviction settings via maxIdleTime (200 seconds) and maxLifeTime (1 hour).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +54 to +57
private Duration responseTimeout = Duration.ofSeconds(60);

private Duration maxIdleTime;
private Duration maxLifeTime;
private Duration maxIdleTime = Duration.ofSeconds(200);
private Duration maxLifeTime = Duration.ofHours(1);
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces new default behavior (timeouts and connection pool maxIdleTime/maxLifeTime) but there is no test asserting these defaults when the user does not explicitly configure them. Consider adding/adjusting tests to verify the default durations are applied (and that they can still be disabled when set to null via the builder), to prevent accidental regressions.

Copilot uses AI. Check for mistakes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree we should have test for the default values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants