How to change HTTPConfig.readTimeout dynamically?
blackpill opened this issue · comments
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.
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.