From 724408a27e282971770bc0069153296b0d7bfe3a Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Mon, 2 Oct 2017 21:27:41 +0200 Subject: [PATCH] Minor fix --- .../CQRS/Events/Actors/EventConsumerActor.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Squidex.Infrastructure/CQRS/Events/Actors/EventConsumerActor.cs b/src/Squidex.Infrastructure/CQRS/Events/Actors/EventConsumerActor.cs index 67abb9778..2536f57d4 100644 --- a/src/Squidex.Infrastructure/CQRS/Events/Actors/EventConsumerActor.cs +++ b/src/Squidex.Infrastructure/CQRS/Events/Actors/EventConsumerActor.cs @@ -195,7 +195,8 @@ namespace Squidex.Infrastructure.CQRS.Events.Actors private async Task StopAsync(Exception exception = null) { - eventSubscription.StopAsync().Forget(); + eventSubscription?.StopAsync().Forget(); + eventSubscription = null; await eventConsumerInfoRepository.StopAsync(eventConsumer.Name, exception?.ToString()); }