From 780c75115fd6dd8b63ac2fec8ba778e342d5d41a Mon Sep 17 00:00:00 2001 From: Jonas Ekskog Date: Mon, 31 Jul 2023 14:24:27 +0200 Subject: [PATCH] Handle dropped connection in postgres subscriptions. (#226) --- .../Subscriptions/PostgresSubscriptionBase.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Postgres/src/Eventuous.Postgresql/Subscriptions/PostgresSubscriptionBase.cs b/src/Postgres/src/Eventuous.Postgresql/Subscriptions/PostgresSubscriptionBase.cs index be15c395..7b8acb17 100644 --- a/src/Postgres/src/Eventuous.Postgresql/Subscriptions/PostgresSubscriptionBase.cs +++ b/src/Postgres/src/Eventuous.Postgresql/Subscriptions/PostgresSubscriptionBase.cs @@ -83,9 +83,8 @@ async Task PollingQuery(ulong? position, CancellationToken cancellationToken) { retryDelay *= 2; } catch (Exception e) { - IsDropped = true; - Log.WarnLog?.Log(e, "Dropped"); - throw; + Dropped(DropReason.ServerError, e); + break; } } }