fix(PostgreSQL): idle timeout disabled

This commit is contained in:
Fabio Di Stasio 2022-05-15 17:37:54 +02:00
parent c826888b0d
commit a082514f88
1 changed files with 5 additions and 1 deletions

View File

@ -144,7 +144,11 @@ export class PostgreSQLClient extends AntaresCore {
async getConnectionPool () {
const dbConfig = await this.getDbConfig();
const pool = new pg.Pool({ ...dbConfig, max: this._poolSize });
const pool = new pg.Pool({
...dbConfig,
max: this._poolSize,
idleTimeoutMillis: 0
});
const connection = pool;
if (this._params.readonly) {