Can't call 'size' without the lock.

This commit is contained in:
JoelKatz
2013-01-11 11:28:24 -08:00
parent 88b27a19ed
commit ef9a0f3ed3

View File

@@ -164,7 +164,7 @@ void ConnectionPool::policyLowWater()
int iPort;
// Find an entry to connect to.
if (mConnectedMap.size() > theConfig.PEER_CONNECT_LOW_WATER)
if (getPeerCount() > theConfig.PEER_CONNECT_LOW_WATER)
{
// Above low water mark, don't need more connections.
cLog(lsTRACE) << "Pool: Low water: sufficient connections: " << mConnectedMap.size() << "/" << theConfig.PEER_CONNECT_LOW_WATER;