mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
Updater: stop download if window closed/thread aborted
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@4987 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
@@ -400,7 +400,8 @@ static NTSTATUS DownloadUpdateThreadStart(
|
||||
|
||||
while ((nReadFile = InternetReadFile(hRequest, buffer, BUFFER_LEN, &dwBytesRead)))
|
||||
{
|
||||
if (dwBytesRead == 0)
|
||||
// If we get zero bytes or the download thread was closed.
|
||||
if (dwBytesRead == 0 || !DownloadThreadHandle)
|
||||
break;
|
||||
|
||||
if (!nReadFile)
|
||||
@@ -442,7 +443,8 @@ static NTSTATUS DownloadUpdateThreadStart(
|
||||
|
||||
while ((nReadFile = InternetReadFile(hRequest, buffer, BUFFER_LEN, &dwBytesRead)))
|
||||
{
|
||||
if (dwBytesRead == 0)
|
||||
// If we get zero bytes or the download thread was closed.
|
||||
if (dwBytesRead == 0 || !DownloadThreadHandle)
|
||||
break;
|
||||
|
||||
if (!nReadFile)
|
||||
|
||||
Reference in New Issue
Block a user