From 5bb0084a130ec0dc8c01a0bdb9d6c0e62b7fba69 Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Wed, 16 Nov 2011 12:08:13 -0500 Subject: [PATCH] minor: adjust low socket threshold --- lib/mongo/util/pool.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mongo/util/pool.rb b/lib/mongo/util/pool.rb index f523d82..5a3dfd9 100644 --- a/lib/mongo/util/pool.rb +++ b/lib/mongo/util/pool.rb @@ -50,7 +50,7 @@ module Mongo # Operations to perform on a socket @socket_ops = Hash.new { |h, k| h[k] = [] } - @sockets_low = true + @sockets_low = false @sockets = [] @pids = {} @checked_out = [] @@ -263,7 +263,7 @@ module Mongo end @connection_mutex.synchronize do - if @sockets.size > 0.7 * @size + if @size > 10 && @sockets.size > 0.7 * @size @sockets_low = true else @sockets_low = false