summaryrefslogtreecommitdiff
path: root/s/shard.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 /s/shard.cpp
parentb35be1cbb4279e4cddab19e81aafcb7a97cc9d1e (diff)
downloadmongo-ecec906288814519103f7d50dff5475dec969edb.tar.gz
fix connection pooling a bit
Diffstat (limited to 's/shard.cpp')
-rw-r--r--s/shard.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/s/shard.cpp b/s/shard.cpp
index 1b883205ff9..7f60a6423d4 100644
--- a/s/shard.cpp
+++ b/s/shard.cpp
@@ -31,7 +31,7 @@ namespace mongo {
list<BSONObj> all;
{
- ShardConnection conn( configServer.getPrimary() );
+ ScopedDbConnection conn( configServer.getPrimary() );
auto_ptr<DBClientCursor> c = conn->query( ShardNS::shard , Query() );
while ( c->more() ){
all.push_back( c->next().getOwned() );
@@ -119,7 +119,7 @@ namespace mongo {
BSONObj Shard::runCommand( const string& db , const BSONObj& cmd ) const {
- ShardConnection conn( this );
+ ScopedDbConnection conn( this );
BSONObj res;
bool ok = conn->runCommand( db , cmd , res );
if ( ! ok ){