From bc9eefca6483bce5812ed50d019840b0afeff73f Mon Sep 17 00:00:00 2001 From: Pieterjan Spoelders Date: Wed, 23 Oct 2024 17:48:46 +0200 Subject: [PATCH] fixed connect logic for current version by calling acquire --- src/lib/sql-client.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/sql-client.ts b/src/lib/sql-client.ts index b5ad4af..10419bb 100644 --- a/src/lib/sql-client.ts +++ b/src/lib/sql-client.ts @@ -88,6 +88,9 @@ export class ExasolDriver implements IExasolDriver { * @inheritDoc */ public async connect(): Promise { + await this.acquire(); + } + private async createConnectionAndAddToPool(): Promise { let hasCredentials = false; let isBasicAuth = false; if (this.config.user && this.config.password) { @@ -418,7 +421,7 @@ export class ExasolDriver implements IExasolDriver { } else { //create a new connection if the pool is not at max size, add it to the pool and then acquire it. this.logger.debug('[SQLClient] Found no free connection and pool did not reach its limit, will create new connection'); - await this.connect(); + await this.createConnectionAndAddToPool(); connection = this.pool.acquire(); } if (!connection) {