Skip to content

Conversation

@hynekdav
Copy link

Summary

Fixes HTTP timeout handling in BaseClient.

The client was initializing connect_timeout and read_timeout, but the timeout was not applied to requests.
This change ensures the configured timeout is actually used by the underlying urllib3 client.

Motivation

Without an enforced timeout, HTTP requests can block for an unbounded amount of time, which can lead to:

  • stalled workers under network issues,
  • inflated tail latencies,
  • misleading performance metrics.

Since the client already exposes timeout parameters, this aligns the behavior with what users would reasonably expect.

What changed

  • Moved self.timeout initialization before creating the PoolManager.
  • Initialized PoolManager with the configured timeout so it is applied to requests.

Impact

  • No public API changes.
  • Existing timeout parameters now behave as intended.
  • Safer and more predictable behavior in case of network or upstream issues.

Notes

  • Retry behavior remains unchanged.
  • Timeout handling follows standard urllib3 usage.

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.

1 participant