-
Notifications
You must be signed in to change notification settings - Fork 0
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
CE changes for Winsparkle DLL #1
base: master
Are you sure you want to change the base?
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
@loberlander This is ready for review too. |
{ | ||
if (checkUpdates) | ||
{ | ||
static const time_t ONE_DAY = 60 * 60 * 24; |
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.
This does not seem to be used here. Is it needed?
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.
Agreed, I'm not using it and doesn't look like it was used before in the base Winsparkle library. I'll remove it.
} | ||
} | ||
// Check every 5 minutes | ||
Sleep(300000); |
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.
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()?
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.
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
UX changes, don't use caching for loading release notes, check for updates in the background.