Fix server crash on shutdown due to DB notifications (#31379)
Fixes #31365
This commit is contained in:
committed by
GitHub
parent
64630ee16b
commit
b396996af8
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user