-
Notifications
You must be signed in to change notification settings - Fork 124
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
Add slow-speed timeout when downloading mod #611
Conversation
Wait, the timeout kicks even though progress is made? As long as there's still an error when connection is dropped entirely (no progress made) this is fine to merge by me ^^ |
This is not straightforward to implement, but I suppose I could implement such a behavior using CURLOPT_LOW_SPEED_TIME. EDIT: done in fb8ebf6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, definitely preferable to a hard timeout
For testing I guess the easiest way would be to yank the ethernet cable half way through download? Not sure if we even need testing for it though as the feature as a whole is still considered unreleased as it's gated behind convar. |
I did the testing by cutting the Wi-Fi signal, but it's the same idea, yeah. |
Given that you already tested it, I'm skip testing on my end and just merge directly instead ^^ |
wait, where did the arg removal go? Hol' up. |
Okay, now it should be ready to merge, lol |
Adds a timeout if connection is too slow.
Previous PR text:
While currently in a business trip, not having access to a super duper fiber Internet connection, I tried downloading some mods, which failed due to the poor Internet connection: mod request would timeout before mod is downloaded.
Looking in the code, I realized I put the same timeout for the mod fetching request than for the mods list fetching request, which is 30 seconds.
I thought about setting the timeout with a higher value (a few minutes or so), but then I remembered when I was a little boy, I would leave my computer running overnight to download games because my Internet connection was so shitty :>
In this PR, I ended up completely removing the timeout attribute, meaning mod fetching requests will never time out (according to curl documentation).
/storytelling off