CE changes for Winsparkle DLL#1
Open
jaredburkeen wants to merge 10 commits intomasterfrom
Open
Conversation
There are cases where INTERNET_STATUS_CONNECTION_CLOSED events could be triggered during a download transfer (due to network connectivity issues). Previously, WinSparkle would erroneously report the download as successfully completed due to the fact that InternetReadFileEx would return TRUE with 'dwBufferLength' set to zero after the connection closed event. This commit aims to gracefully handle these events (by throwing an exception) via doing the following: - When an INTERNET_STATUS_CONNECTION_CLOSED event is triggered, immediately close the connection handle so that future API calls will return failure (e.g. ERROR_INVALID_HANDLE). - If the download has completed (indicated by 'dwBufferLength' being zero), check that the connection handle is still valid. This detects the case when the INTERNET_STATUS_CONNECTION_CLOSED event is received and the connection handle is closed during a call to InternetReadFileEx.
…dates in the background
Author
|
@loberlander This is ready for review too. |
loberlander
reviewed
Sep 20, 2016
| { | ||
| if (checkUpdates) | ||
| { | ||
| static const time_t ONE_DAY = 60 * 60 * 24; |
There was a problem hiding this comment.
This does not seem to be used here. Is it needed?
Author
There was a problem hiding this comment.
Agreed, I'm not using it and doesn't look like it was used before in the base Winsparkle library. I'll remove it.
loberlander
reviewed
Sep 20, 2016
| } | ||
| } | ||
| // Check every 5 minutes | ||
| Sleep(300000); |
There was a problem hiding this comment.
Why is the high frequency (every 5 minutes) periodic checking needed? Why can't we just sleep once for the exact time defined by the returned value of win_sparkle_get_update_check_interval()?
Author
There was a problem hiding this comment.
This was set at 5 minutes for testing purposes. You're correct, I should be able to change to the update check interval. Thanks!
…dates in the background
…arkle into ce-winsparkle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UX changes, don't use caching for loading release notes, check for updates in the background.