Skip to content

Commit

Permalink
chore: emit close event before closing client
Browse files Browse the repository at this point in the history
  • Loading branch information
stfsy committed Dec 26, 2023
1 parent 7e97f48 commit 8c347e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/simple-resource-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,10 @@ module.exports = class {
* @method close
* @returns {void}
*/
close() {
async close() {
if (this._emitUsageEventEnabled) {
await this._emiteUsageEvent({ context: 'close' })
}
return this._mongoDbClient.close()
}
}

0 comments on commit 8c347e4

Please sign in to comment.