diff --git a/lib/commands/query.js b/lib/commands/query.js index 117e4bac70..3f7317dde3 100644 --- a/lib/commands/query.js +++ b/lib/commands/query.js @@ -322,6 +322,12 @@ class Query extends Command { this.emit('error', err); } } + + async [Symbol.asyncDispose](){ + if(this._connection){ + await this._connection.release(); + } + } } Query.prototype.catch = Query.prototype.then;