mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2024-11-27 17:00:59 +01:00
Weather: Wait a bit before refreshing when network connectivity is restored
This is so that we avoid a situation where the browser was looping on trying to display the error page. Each navigation request was erroring out, and the error said something along the lines of "Your computer went to sleep". Indeed, this bug could be reproduced by hibernating the computer and then waking it up - it seemed to occur pretty frequently, especially on battery, when the power budget is more constrained, and thus the speed of the PC as well. Hopefully, this commit and the previous one addresses this issue.
This commit is contained in:
parent
aeb8e54b58
commit
da3fece8cd
@ -75,7 +75,8 @@ HRESULT STDMETHODCALLTYPE INetworkListManagerEvents_ConnectivityChanged(void* _t
|
|||||||
{
|
{
|
||||||
printf("[Network Events] Internet connection status is: Available.\n");
|
printf("[Network Events] Internet connection status is: Available.\n");
|
||||||
LONG64 dwUpdateSchedule = InterlockedAdd64(&_this->dwUpdateSchedule, 0);
|
LONG64 dwUpdateSchedule = InterlockedAdd64(&_this->dwUpdateSchedule, 0);
|
||||||
PostMessageW(_this->hWnd, EP_WEATHER_WM_FETCH_DATA, 0, 0);
|
SetTimer(_this->hWnd, EP_WEATHER_TIMER_REQUEST_REFRESH, EP_WEATHER_TIMER_REQUEST_REFRESH_DELAY, NULL);
|
||||||
|
//PostMessageW(_this->hWnd, EP_WEATHER_WM_FETCH_DATA, 0, 0);
|
||||||
SetTimer(_this->hWnd, EP_WEATHER_TIMER_SCHEDULE_REFRESH, dwUpdateSchedule, NULL);
|
SetTimer(_this->hWnd, EP_WEATHER_TIMER_SCHEDULE_REFRESH, dwUpdateSchedule, NULL);
|
||||||
printf("[Network Events] Reinstalled refresh timer.\n");
|
printf("[Network Events] Reinstalled refresh timer.\n");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user