From b809cd297e69e55efea5a6b7b7469187ed8be646 Mon Sep 17 00:00:00 2001 From: Ciro Spaciari Date: Mon, 8 Sep 2025 20:50:40 -0700 Subject: [PATCH] test --- src/js/internal/sql/mysql.ts | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/js/internal/sql/mysql.ts b/src/js/internal/sql/mysql.ts index f41cb3c221..d9f025ee69 100644 --- a/src/js/internal/sql/mysql.ts +++ b/src/js/internal/sql/mysql.ts @@ -396,19 +396,13 @@ class PooledMySQLConnection { this.queryCount = 0; this.flags &= ~PooledConnectionFlags.reserved; - try { - // notify all queries that the connection is closed - for (const onClose of queries) { - onClose(err); - } - const onFinish = this.onFinish; - if (onFinish) { - onFinish(err); - } - } catch (e) { - console.log("onClose error", e, this instanceof PooledMySQLConnection, this, this.queries); - console.log("error", err); - throw e; + // notify all queries that the connection is closed + for (const onClose of queries) { + onClose(err); + } + const onFinish = this.onFinish; + if (onFinish) { + onFinish(err); } this.adapter.release(this, true); @@ -425,7 +419,7 @@ class PooledMySQLConnection { this.connection = await PooledMySQLConnection.createConnection( this.connectionInfo, this.#onConnected.bind(this), - this.#onClose.bind(this), + (...args) => this.#onClose(...args), ); }