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

Insane update timeout #17

Closed
nexy7574 opened this issue Jan 3, 2023 · 2 comments
Closed

Insane update timeout #17

nexy7574 opened this issue Jan 3, 2023 · 2 comments

Comments

@nexy7574
Copy link

nexy7574 commented Jan 3, 2023

According to src/http.rs#L15, the default timeout for updating is 1 hour. This is quite insane, as who's prepared to wait an hour to download an update?
My current network blocks spotify, however allows the connection to open - this means that spotify-launcher hangs for an hour before giving up, unless --skip-update is passed (which isn't ideal when I'm only on this network 4 out of 7 days of the week, for a few hours each day).

Are there any plans to allow the timeout to be configurable, or at the very least lowered?

@kpcyrd
Copy link
Owner

kpcyrd commented Jan 3, 2023

I think I misread the documentation back then and confused it with tokio::time::Timeout, which would be the timout for the entire download operation. I've changed the timeout to 10 seconds, which means if no data was transfered for 10 seconds it's going to fail the download. This might be annoying when trying to do the initial download over a very slow/unreliable connection but probably better than the startup being stuck for a very long time when there's already an installation we could use.

@kpcyrd
Copy link
Owner

kpcyrd commented Jan 3, 2023

I read the documentation correctly, the timeout is for the whole duration of the request, so setting this to 30 means the download is going to fail for everybody who can't download that fast.

I've refactored this with tokio::time::Timeout so it's based on inactivity and released it in 0.4.1.

@kpcyrd kpcyrd closed this as completed Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants