Fix server crash on shutdown due to DB notifications (#31379)

Fixes #31365
This commit is contained in:
Pieter-Jan Briers
2024-08-24 01:45:13 +02:00
committed by GitHub
parent 64630ee16b
commit b396996af8

View File

@@ -97,6 +97,8 @@ public sealed partial class ServerDbPostgres
_notifyLog.Error($"Error in notification listener: {e}");
}
}
_notificationConnection.Dispose();
}
private void OnNotification(object _, NpgsqlNotificationEventArgs notification)
@@ -116,6 +118,5 @@ public sealed partial class ServerDbPostgres
return;
_notificationConnection.Notification -= OnNotification;
_notificationConnection.Dispose();
}
}