check tasks for completion

This commit is contained in:
Kyle Spearrin 2019-05-07 23:21:56 -04:00
parent 68c6537bcb
commit cf2ae9d7e8
2 changed files with 3 additions and 3 deletions

View file

@ -224,7 +224,7 @@ namespace Bit.Core.Services
{ {
return Task.FromResult(DecryptedCipherCache); return Task.FromResult(DecryptedCipherCache);
} }
if(_getAllDecryptedTask != null) if(_getAllDecryptedTask != null && !_getAllDecryptedTask.IsCompleted && !_getAllDecryptedTask.IsFaulted)
{ {
return _getAllDecryptedTask; return _getAllDecryptedTask;
} }

View file

@ -121,7 +121,7 @@ namespace Bit.Core.Services
{ {
return Task.FromResult(_encKey); return Task.FromResult(_encKey);
} }
if(_getEncKeysTask != null) if(_getEncKeysTask != null && !_getEncKeysTask.IsCompleted && !_getEncKeysTask.IsFaulted)
{ {
return _getEncKeysTask; return _getEncKeysTask;
} }
@ -224,7 +224,7 @@ namespace Bit.Core.Services
{ {
return Task.FromResult(_orgKeys); return Task.FromResult(_orgKeys);
} }
if(_getOrgKeysTask != null) if(_getOrgKeysTask != null && !_getOrgKeysTask.IsCompleted && !_getOrgKeysTask.IsFaulted)
{ {
return _getOrgKeysTask; return _getOrgKeysTask;
} }