Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
feat(sessions): adding endAllPooledSessions helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
daprahamian committed Feb 23, 2018
1 parent 2b81bb6 commit d7804ed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ class ServerSessionPool {
this.sessions = [];
}

endAllPooledSessions() {
if (this.sessions.length) {
this.topology.endSessions(this.sessions.map(session => session.id));
this.sessions = [];
}
}

/**
* @returns {ServerSession}
*/
Expand Down

0 comments on commit d7804ed

Please sign in to comment.