mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
wip
This commit is contained in:
@@ -396,19 +396,15 @@ 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);
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ pub fn createMySQLError(
|
||||
message: []const u8,
|
||||
options: MySQLErrorOptions,
|
||||
) bun.JSError!JSValue {
|
||||
const opts_obj = JSValue.createEmptyObject(globalObject, 18);
|
||||
const opts_obj = JSValue.createEmptyObject(globalObject, 0);
|
||||
opts_obj.ensureStillAlive();
|
||||
opts_obj.put(globalObject, JSC.ZigString.static("code"), try bun.String.createUTF8ForJS(globalObject, options.code));
|
||||
if (options.errno) |errno| {
|
||||
|
||||
Reference in New Issue
Block a user