minor: adjust low socket threshold
This commit is contained in:
parent
63ca1c7648
commit
5bb0084a13
|
@ -50,7 +50,7 @@ module Mongo
|
||||||
# Operations to perform on a socket
|
# Operations to perform on a socket
|
||||||
@socket_ops = Hash.new { |h, k| h[k] = [] }
|
@socket_ops = Hash.new { |h, k| h[k] = [] }
|
||||||
|
|
||||||
@sockets_low = true
|
@sockets_low = false
|
||||||
@sockets = []
|
@sockets = []
|
||||||
@pids = {}
|
@pids = {}
|
||||||
@checked_out = []
|
@checked_out = []
|
||||||
|
@ -263,7 +263,7 @@ module Mongo
|
||||||
end
|
end
|
||||||
|
|
||||||
@connection_mutex.synchronize do
|
@connection_mutex.synchronize do
|
||||||
if @sockets.size > 0.7 * @size
|
if @size > 10 && @sockets.size > 0.7 * @size
|
||||||
@sockets_low = true
|
@sockets_low = true
|
||||||
else
|
else
|
||||||
@sockets_low = false
|
@sockets_low = false
|
||||||
|
|
Loading…
Reference in New Issue