diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-05-05 08:37:37 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-05-05 08:37:37 -0400 |
commit | 676a1aee8e78dd5570c6761128f632789b4ce3ba (patch) | |
tree | b2384a2618ba41da7ca5c2409367d4ff56cfc9c9 | |
parent | 660616f57dc1bf23bf1316b22db88b7d1cf98b80 (diff) | |
download | mongo-676a1aee8e78dd5570c6761128f632789b4ce3ba.tar.gz |
fix connPoolStats race condition SERVER-3043
-rw-r--r-- | client/connpool.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/connpool.cpp b/client/connpool.cpp index a521699bebe..23d14da88b3 100644 --- a/client/connpool.cpp +++ b/client/connpool.cpp @@ -192,6 +192,9 @@ namespace mongo { { scoped_lock lk( _mutex ); for ( PoolMap::iterator i=_pools.begin(); i!=_pools.end(); ++i ) { + if ( i->second.numCreated() == 0 ) + continue; + string s = i->first; BSONObjBuilder temp( bb.subobjStart( s ) ); temp.append( "available" , i->second.numAvailable() ); |