Open lorenzo9uerra opened 2 years ago
The problem is that teloxide uses 17 second network timeout by default and iirc we did this since 0.1
.
You can workaround this issue by increasing the timeout:
let client = net::default_reqwest_settings().timeout(Duration::from_secs(30));
let bot = Bot::with_client(scrape_config.token, client);
Some ideas how we may fix this in the future:
Request
trait, that would allow to changing timeout on by-request basisBoth of these are blocked on the same thing as #526 (see https://github.com/teloxide/teloxide/issues/526#issuecomment-1048754931).
@WaffleLapkin, is this fixed?
@Hirrolot no, this is still blocked on https://github.com/seanmonstar/reqwest/pull/1477
While I'm uploading a video of at least 50MB (I guess this depends on the speed of your connection, to reproduce the issue it has to take more than 17 seconds) the program stops after exactly 17 seconds from the start.
I tried this code:
I expected to see the video uploaded to the chat_id specified.
Instead, the upload stopped after exactly 17 seconds with the message "operation timed out". I tried to downgrade teloxide-core to 0.4.1 but it didn't make any difference. I also tried to downgrade teloxide version to 0.6.0, no difference.
Dependencies