diff --git a/Content.Server/Database/ServerDbPostgres.Notifications.cs b/Content.Server/Database/ServerDbPostgres.Notifications.cs index fe358923bf0..69cf2c7d775 100644 --- a/Content.Server/Database/ServerDbPostgres.Notifications.cs +++ b/Content.Server/Database/ServerDbPostgres.Notifications.cs @@ -97,6 +97,8 @@ private async Task NotificationListener(CancellationToken cancellationToken) _notifyLog.Error($"Error in notification listener: {e}"); } } + + _notificationConnection.Dispose(); } private void OnNotification(object _, NpgsqlNotificationEventArgs notification) @@ -116,6 +118,5 @@ public override void Shutdown() return; _notificationConnection.Notification -= OnNotification; - _notificationConnection.Dispose(); } }