This commit is contained in:
SPRINX0\prochazka
2024-12-03 17:00:44 +01:00
parent 05cbb915d6
commit 3a4e4ecbdc

View File

@@ -302,6 +302,9 @@ module.exports = {
}, },
async checkUnsavedConnectionsLimit() { async checkUnsavedConnectionsLimit() {
if (!this.datastore) {
return;
}
const MAX_UNSAVED_CONNECTIONS = 5; const MAX_UNSAVED_CONNECTIONS = 5;
await this.datastore.transformAll(connections => { await this.datastore.transformAll(connections => {
const count = connections.filter(x => x.unsaved).length; const count = connections.filter(x => x.unsaved).length;