Do not hide errors happening in tasks spawned by BaseAsyncService

This commit is contained in:
nicolas.dorier 2022-10-08 12:46:26 +09:00
parent e1a235b4e8
commit e883714446
No known key found for this signature in database
GPG key ID: 6618763EF09186FE
2 changed files with 9 additions and 1 deletions

View file

@ -27,6 +27,12 @@ namespace BTCPayServer.HostedServices
public virtual Task StartAsync(CancellationToken cancellationToken)
{
_Tasks = InitializeTasks();
foreach (var t in _Tasks)
t.ContinueWith(t =>
{
if (t.IsFaulted)
Logs.PayServer.LogWarning(t.Exception, $"Unhanded exception in {this.GetType().Name}");
}, TaskScheduler.Default);
return Task.CompletedTask;
}

View file

@ -17,9 +17,11 @@
### Improvement
* The wallet transaction list use infinity scroll rather than pagination @HamroRamro @dennisreimann
* The wallet transaction list use infinity scroll rather than pagination (#4074) @HamroRamro @dennisreimann
* Remove direct and temp link functionality from the File Storage (#4177) @daviogg
* Fix warning error when rebooting the server caused by some shitcoin currency pair format @NicolasDorier
* Add Invoice.OrderId to list of supported email interpolation strings (#4202) @bolatovumar
* Do not hide errors happening in tasks spawned by BaseAsyncService @NicolasDorier
## 1.6.11