Skip to content

Commit 86f844e

Browse files
committed
Fixed vercel transactions not closing on sql client
1 parent 09cddcb commit 86f844e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drizzle-orm/src/vercel-postgres/session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ export class VercelPgSession<
321321
await tx.execute(sql`rollback`);
322322
throw error;
323323
} finally {
324-
if (this.client instanceof VercelPool) { // oxlint-disable-line drizzle-internal/no-instanceof
324+
if (typeof this.client === 'function' || this.client instanceof VercelPool) { // oxlint-disable-line drizzle-internal/no-instanceof
325325
(session.client as VercelPoolClient).release();
326326
}
327327
}

0 commit comments

Comments
 (0)