diff --git a/lib/sessions.js b/lib/sessions.js index b55af7539..110add8e7 100644 --- a/lib/sessions.js +++ b/lib/sessions.js @@ -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} */