Skip to content

Commit 59e4bcf

Browse files
committed
fix(jdbc-driver): Actually call connection.close in pool's destroy
1 parent 9f6ccdc commit 59e4bcf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/cubejs-jdbc-driver/src/JDBCDriver.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ export class JDBCDriver extends BaseDriver {
148148
const getConnection = promisify(DriverManager.getConnection.bind(DriverManager));
149149
return new Connection(await getConnection(this.config.url, this.jdbcProps));
150150
},
151-
// @ts-expect-error Promise<Function> vs Promise<void>
152-
destroy: async (connection) => promisify(connection.close.bind(connection)),
151+
destroy: async (connection) => promisify(connection.close.bind(connection))(),
153152
validate: async (connection) => (
154153
new Promise((resolve) => {
155154
const isValid = promisify(connection.isValid.bind(connection));

0 commit comments

Comments
 (0)