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

Commit d7804ed

Browse files
committed
feat(sessions): adding endAllPooledSessions helper method
1 parent 2b81bb6 commit d7804ed

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/sessions.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ class ServerSessionPool {
141141
this.sessions = [];
142142
}
143143

144+
endAllPooledSessions() {
145+
if (this.sessions.length) {
146+
this.topology.endSessions(this.sessions.map(session => session.id));
147+
this.sessions = [];
148+
}
149+
}
150+
144151
/**
145152
* @returns {ServerSession}
146153
*/

0 commit comments

Comments
 (0)