Fix NRE in BaseService.StopAsync

This commit is contained in:
nicolas.dorier 2021-10-12 17:39:48 +09:00
parent 67ba64b0a1
commit b5ebd14589
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE

View File

@ -57,7 +57,8 @@ namespace BTCPayServer.HostedServices
if (_Cts != null)
{
_Cts.Cancel();
await Task.WhenAll(_Tasks);
if (_Tasks != null)
await Task.WhenAll(_Tasks);
}
Logs.PayServer.LogInformation($"{this.GetType().Name} successfully exited...");
}