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

How to change HTTPConfig.readTimeout dynamically? #144

Open
blackpill opened this issue Oct 10, 2023 · 1 comment
Open

How to change HTTPConfig.readTimeout dynamically? #144

blackpill opened this issue Oct 10, 2023 · 1 comment

Comments

@blackpill
Copy link

My iOS application provides a long mjpeg stream on web server.
Because of HTTPConfig.readTimeout, the stream will stop when the time reaches HTTPConfig.readTimeout.

Currently, I have to change HTTPConfig.readTimeout to -1 in Telegraph's code.
How can I change HTTPConfig.readTimeout dynamically?

Thank you.

@yvbeek
Copy link
Member

yvbeek commented Mar 31, 2024

That is definitely tricky and unfortunately a scenario that Telegraph doesn't support. The readTimeout gets applied to the entire HTTPConnection. There isn't currently a separate timeout for reading the headers of a request versus reading the body of a request. Therefor you can't really specify a different timeout for each endpoint. That is going to require some bigger changes to Telegraph.

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

No branches or pull requests

2 participants