From 7eba83201b8b6f6f115f53add86760611896822f Mon Sep 17 00:00:00 2001 From: Dan Hensby Date: Mon, 9 Jun 2025 15:57:18 +0100 Subject: [PATCH] feat: reset tedious connections when returned to the pool --- lib/tedious/connection-pool.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/tedious/connection-pool.js b/lib/tedious/connection-pool.js index 014c0d4f..82d14132 100644 --- a/lib/tedious/connection-pool.js +++ b/lib/tedious/connection-pool.js @@ -149,6 +149,14 @@ class ConnectionPool extends BaseConnectionPool { } }) } + + release (connection) { + debug('connection(%d): reset', IDS.get(connection)) + connection.reset(() => { + super.release(connection) + }) + return this + } } module.exports = ConnectionPool