diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-05-20 13:36:29 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-05-20 13:36:29 -0400 |
commit | ecec906288814519103f7d50dff5475dec969edb (patch) | |
tree | 778cc00d815a7ec4f0156b668343cc0e1798b69a /client/connpool.cpp | |
parent | b35be1cbb4279e4cddab19e81aafcb7a97cc9d1e (diff) | |
download | mongo-ecec906288814519103f7d50dff5475dec969edb.tar.gz |
fix connection pooling a bit
Diffstat (limited to 'client/connpool.cpp')
-rw-r--r-- | client/connpool.cpp | 9 |
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: |