Merge pull request #335 from kamyker/subdl-fix

Fixed sometimes false returned from SubscribeDownloadAsync
This commit is contained in:
Garry Newman 2019-12-06 08:47:30 +00:00 committed by GitHub
commit 127de84c8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -278,11 +278,11 @@ public async Task<bool> SubscribeDownloadAsync( Action<float> progress = null, C
while ( true )
{
if ( ct.IsCancellationRequested )
return false;
break;
progress?.Invoke( DownloadAmount );
if ( !IsDownloading )
if ( !IsDownloading && State.HasFlag( ItemState.Installed ) )
break;
await Task.Delay( milisecondsUpdateDelay );