How can I force Better Auth to close its database connection?

I'm setting up Better Auth with mysql2/promise's createPool function. I'm using auth.api.signUpEmail from inside a database seeder to create valid users in the database. Since I did that, my seeders don't return, most probably because Better Auth has an open database connection. I tried calling await auth.config.database.end() after the seeders: the call returns but the process still does not exit. Any ideas ?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?