From 4a9138ce9c9e87e27a6e2acb72ed2bafbfb64baa Mon Sep 17 00:00:00 2001 From: diego Dupin Date: Wed, 18 May 2022 17:31:58 +0200 Subject: [PATCH] reporting leak message change #190 --- lib/pool.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/pool.js b/lib/pool.js index 0f89a5fe..e7396156 100644 --- a/lib/pool.js +++ b/lib/pool.js @@ -148,9 +148,11 @@ class Pool extends EventEmitter { conn.leakProcess = setTimeout( (conn) => { console.log( - `Possible connection leak on thread ${conn.info.threadId} (connection not returned to pool since ${ - Date.now() - conn.lastUse - }ms. Did connection.released() been implemented` + 'A possible connection leak on the thread ' + + conn.info.threadId + + ' (the connection not returned to the pool since ' + + (Date.now() - conn.lastUse) + + 'ms). Has the connection.release() been called ?' ); conn.leaked = true; },