diff options
author | Greg Studer <greg@10gen.com> | 2013-01-08 15:30:28 -0500 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2013-01-08 15:30:28 -0500 |
commit | e330e5269e9a243e167c5933809602e5e0a36e39 (patch) | |
tree | 85d34d19d3858f85c965cca92527b0a0d586c0fe | |
parent | d857206880ff052f71ebc1593a600d9e327dddde (diff) | |
download | mongo-e330e5269e9a243e167c5933809602e5e0a36e39.tar.gz |
SERVER-8112 use a scopeddbconnection for auth to unsharded auth collection
-rw-r--r-- | src/mongo/s/security.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/s/security.cpp b/src/mongo/s/security.cpp index cda712815a4..f309369c20d 100644 --- a/src/mongo/s/security.cpp +++ b/src/mongo/s/security.cpp @@ -79,7 +79,9 @@ namespace mongo { DBConfigPtr config = grid.getDBConfig( adminNs ); Shard s = config->getShard( adminNs ); - ShardConnection conn( s, adminNs ); + scoped_ptr<ScopedDbConnection> connPtr( + ScopedDbConnection::getInternalScopedDbConnection(s.getConnString(), 30.0)); + ScopedDbConnection& conn = *connPtr; BSONObj result = conn->findOne("admin.system.users", Query()); if( result.isEmpty() ) { if( ! _warned ) { |