make sure the waitingInvoices tasks are done

This commit is contained in:
nicolas.dorier 2018-02-17 01:43:43 +09:00
parent aa8565e3cc
commit 9d406923ae

View File

@ -331,7 +331,8 @@ namespace BTCPayServer.HostedServices
{
leases.Dispose();
_Cts.Cancel();
return _Loop;
var waitingPendingInvoices = _WaitingInvoices ?? Task.CompletedTask;
return Task.WhenAll(waitingPendingInvoices, _Loop);
}
}
}