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

Added Timeout option in MyWebClient class for the WebRequest #726

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DavidArtifacts
Copy link
Contributor

@DavidArtifacts DavidArtifacts commented Jan 30, 2025

Hi, I added a static property Timeout to the AutoUpdater class to configure the timeout in milliseconds for web requests made by WebClient, with a default value of 100,000 ms.

The GetWebClient method now sets the Timeout of the MyWebClient instance to AutoUpdater.Timeout. The MyWebClient class also includes a new Timeout property and the GetWebRequest method has been overridden to use this value.

The reason is because by default WebRequest timeout sometimes is not enough to establish connection to the http server, as commented in this issue #489.

However, this could be a temporary solution because of #676.

We tested it under local conditions, but you are free to test it in more scenarios. Sometimes, it still shows the WebClient request error when intentionally disconnecting from the internet and reconnecting. It only waits for the timeout but does not resume the download, possibly due to the way WebClient works... Edit: It looks like our HTTP server is closing the connection with the client at the moment it loses internet connection. So, the issue is on our side. Testing it with the AutoUpdaterTest project works fine.

Closes #489

Saludos 😄 🇲🇽

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

Successfully merging this pull request may close these issues.

[Questions] How to increate http timeout?
1 participant