Make sure the process doesn't crash if exception raised in Subscribe

This commit is contained in:
nicolas.dorier
2021-10-06 13:22:55 +09:00
parent b970f64639
commit 150e4b842c
7 changed files with 13 additions and 9 deletions

View File

@@ -62,7 +62,7 @@ namespace BTCPayServer.Controllers
IEventAggregatorSubscription subscription = null;
try
{
subscription = _eventAggregator.Subscribe<UserNotificationsUpdatedEvent>(async evt =>
subscription = _eventAggregator.SubscribeAsync<UserNotificationsUpdatedEvent>(async evt =>
{
if (evt.UserId == userId)
{