Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any disconnection detection exist on Stream feature? #6092

Closed
VahidTa opened this issue Mar 23, 2022 · 2 comments
Closed

Is there any disconnection detection exist on Stream feature? #6092

VahidTa opened this issue Mar 23, 2022 · 2 comments

Comments

@VahidTa
Copy link

VahidTa commented Mar 23, 2022

I have a post request to a stream API server. I tried to simulate disconnection during streaming. However, in my case, if I disconnect my connection to the API server which streams data, "requests" continues without breaking the connection or raising any exceptions. Is there any help to overcome this issue? Or is there a feature needs to be added to this kind of scenario?

@nateprewitt
Copy link
Member

Hi @VahidTa,

If you're receiving incomplete data from the broken connection and no error, this is likely an issue in urllib3 that's been fixed in the upcoming urllib3 2.0. We don't have control over detecting this in Requests unfortunately though.

@VahidTa
Copy link
Author

VahidTa commented Mar 24, 2022

I think it is good idea to have "keep-alive" like mechanism for connection status in streaming.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants