-
Notifications
You must be signed in to change notification settings - Fork 908
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
Infinite loop downloading files if connection is lost #285
Comments
This was seen filling up someone's drive at https://chocolatey.org/packages/poweriso#comment-2110611483 |
This issue caused two .zip installation files to fill my drive: one was 90GB (for the Eclipse package) and another of 15GB. My internet connection is wonky and often cuts out, so it's probably due to this loss of connection bug. |
ferventcoder
added a commit
that referenced
this issue
Jul 25, 2015
Previously, if the network connection is lost in the middle of downloading a file, it will cause an infinite loop of error messages similar to ~~~ Exception calling "Read" with "3" argument(s): "Unable to read data from the transport connection: ~~~ Another unwelcome side effect is that the (corrupted) download file will proceed to fill up all available disk space if left unchecked. With this fix, throw immediately when this happens as there is no recovery even if the network connection comes back up.
This has been fixed for 0.9.9.9. |
ferventcoder
changed the title
Infinite loop in Get-WebFile.ps1 if connection is lost
Infinite loop in Get-WebFile if connection is lost
Jul 25, 2015
ferventcoder
changed the title
Infinite loop in Get-WebFile if connection is lost
Infinite loop downloading files if connection is lost
Jul 25, 2015
ferventcoder
added a commit
that referenced
this issue
Jul 25, 2015
ferventcoder
added a commit
that referenced
this issue
Jul 25, 2015
* stable: (doc) add GH-285 to changelog
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Starting on line 110 in Get-WebFile.ps1, there is a loop that reads from the stream:
If the first Read() succeeds, $count will contain a value greater than 0. However, if Read() then starts throwing exceptions due to loss of connection, $count will not be updated and the loop will be repeated forever. This results in the following error, over and over again:
Simplest fix is probably just:
Edit: On second thought, that would break out of the loop but it would also make it appear that Get-WebFile succeeded. This should probably be a fatal error.
The text was updated successfully, but these errors were encountered: