Skip to content

feat: add timeout parameter to Client HTTP requests#259

Open
Flerpharos wants to merge 1 commit into
mainfrom
fix/212-client-http-timeout
Open

feat: add timeout parameter to Client HTTP requests#259
Flerpharos wants to merge 1 commit into
mainfrom
fix/212-client-http-timeout

Conversation

@Flerpharos

Copy link
Copy Markdown
Collaborator

Summary

Client HTTP requests (raw_api_get, raw_api_post, stream_api_get, stream_api_post) previously omitted a timeout argument, defaulting to None (blocking indefinitely). This could cause the caller to hang if the TCP connection stalled or the server accepted the connection but never responded.

Fix

Add a configurable timeout parameter to Client.__init__ (default 60.0s) and pass it down to all requests.Session.get and post calls.

Closes #212

Client HTTP requests (raw_api_get, raw_api_post, stream_api_get,
stream_api_post) previously omitted a timeout argument, defaulting to
None (blocking indefinitely). This could cause the caller to hang if the
TCP connection stalled or the server accepted the connection but never
responded.

Add a configurable 'timeout' parameter to Client.__init__ (default 60.0s)
and pass it down to all requests.Session.get and post calls.

Closes #212
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.

Client HTTP requests have no timeout

1 participant