From 203256dbb8bed634530a93bfed0c974b475307c5 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Fri, 10 Mar 2023 14:06:34 -0500 Subject: [PATCH] fix(connection): add stub implementation of `doClose` to base connection class Fix #12971 --- lib/connection.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/connection.js b/lib/connection.js index 13774f60105..aaf9ff0bc1f 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -1053,6 +1053,16 @@ Connection.prototype._close = function(force, destroy, callback) { return this; }; +/** + * Abstract method that drivers must implement. + * + * @api private + */ + +Connection.prototype.doClose = function() { + throw new Error('Connection#doClose unimplemented by driver'); +}; + /** * Called when the connection closes *