delay clos

This commit is contained in:
Ciro Spaciari
2025-09-09 16:23:21 -07:00
parent b79f0d1e39
commit 7753820bd6
2 changed files with 10 additions and 16 deletions

View File

@@ -403,14 +403,8 @@ pub fn failWithJSValue(this: *MySQLConnection, value: JSValue) void {
const loop = this.vm.eventLoop();
loop.enter();
defer loop.exit();
_ = on_close.call(
this.globalObject,
.js_undefined,
&[_]JSValue{
value.toError() orelse value,
this.getQueriesArray(),
},
) catch |e| this.globalObject.reportActiveExceptionAsUnhandled(e);
this.globalObject.queueMicrotask(on_close, &[_]JSValue{ value.toError() orelse value, this.getQueriesArray() });
}
pub fn fail(this: *MySQLConnection, message: []const u8, err: AnyMySQLError.Error) void {