diff --git a/src/index.ts b/src/index.ts index fa473f1..773e981 100644 --- a/src/index.ts +++ b/src/index.ts @@ -135,8 +135,8 @@ export class SnowflakeDialect extends knex.Client { // when a connection times out or the pool is shutdown. async destroyRawConnection(connection): Promise { try { - const end = promisify((cb) => connection.end(cb)); - await end(); + const destroy = promisify((cb) => connection.destroy(cb)); + await destroy(); } catch (err) { connection.__knex__disposed = err; } finally {