mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 21:47:02 +03:00
lower active connections on error
This commit is contained in:
@@ -155,12 +155,12 @@ export class Postgres implements IDatabase {
|
||||
}
|
||||
}
|
||||
|
||||
this.activePostgresRequests--;
|
||||
Logger.error(`prepare (postgres) try ${tries}: ${err}`);
|
||||
}
|
||||
} while (this.isReadQuery(type) && tries < maxTries()
|
||||
&& this.activePostgresRequests < this.config.postgresReadOnly.stopRetryThreshold);
|
||||
|
||||
this.activePostgresRequests--;
|
||||
throw new Error(`prepare (postgres): ${type} ${query} failed after ${tries} tries`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user