Skip to content

Commit

Permalink
Add MongoClient.cleanupConnections.
Browse files Browse the repository at this point in the history
Disconnects any unused connections to the server.
  • Loading branch information
s-ludwig committed Mar 28, 2019
1 parent 6ce3d37 commit 15ab4d0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mongodb/vibe/db/mongo/client.d
Expand Up @@ -85,6 +85,15 @@ final class MongoClient {
lockConnection();
}

/** Disconnects all currently unused connections to the server.
*/
void cleanupConnections()
{
m_connections.removeUnused((conn) {
conn.disconnect();
});
}

/**
Accesses a collection using an absolute path.
Expand Down

0 comments on commit 15ab4d0

Please sign in to comment.