summaryrefslogtreecommitdiff
path: root/client/connpool.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-05-20 13:36:29 -0400
committerEliot Horowitz <eliot@10gen.com>2010-05-20 13:36:29 -0400
commitecec906288814519103f7d50dff5475dec969edb (patch)
tree778cc00d815a7ec4f0156b668343cc0e1798b69a /client/connpool.cpp
parentb35be1cbb4279e4cddab19e81aafcb7a97cc9d1e (diff)
downloadmongo-ecec906288814519103f7d50dff5475dec969edb.tar.gz
fix connection pooling a bit
Diffstat (limited to 'client/connpool.cpp')
-rw-r--r--client/connpool.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/client/connpool.cpp b/client/connpool.cpp
index a6d8c0464da..3975bcc0275 100644
--- a/client/connpool.cpp
+++ b/client/connpool.cpp
@@ -22,6 +22,7 @@
#include "connpool.h"
#include "../db/commands.h"
#include "syncclusterconnection.h"
+#include "../s/shard.h"
namespace mongo {
@@ -146,6 +147,14 @@ namespace mongo {
}
}
+ ScopedDbConnection::ScopedDbConnection(const Shard& shard )
+ : _host( shard.getConnString() ) , _conn( pool.get(_host) ){
+ }
+
+ ScopedDbConnection::ScopedDbConnection(const Shard* shard )
+ : _host( shard->getConnString() ) , _conn( pool.get(_host) ){
+ }
+
class PoolFlushCmd : public Command {
public: