We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6716b0c commit a1e0a38Copy full SHA for a1e0a38
src/drivers/sql-server/SqlServerDriver.ts
@@ -227,14 +227,14 @@ export class SqlServerConnection extends BaseConnection {
227
private newConnection(config = this.config) {
228
const key = config.server + "//" + config.database + "/" + config.user;
229
return namedPool.getOrCreateAsync(config.server + "://" + config.database,
230
- () => {
+ async () => {
231
const pool = new sql.ConnectionPool(config);
232
const oldClose = pool.close;
233
pool.close = ((c) => {
234
namedPool.delete(key);
235
return oldClose.call(pool, c);
236
}) as any;
237
- return pool.connect();
+ return await pool.connect();
238
}, 15000, (x) => x.close());
239
240
}
0 commit comments