mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
test
This commit is contained in:
@@ -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),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user