diff --git a/lib/mongo/db.rb b/lib/mongo/db.rb index 5730853..d1809c7 100644 --- a/lib/mongo/db.rb +++ b/lib/mongo/db.rb @@ -133,6 +133,7 @@ module XGen @host, @port = *hp begin @socket = TCPSocket.new(@host, @port) + @socket.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) # Check for master. Can't call master? because it uses mutex, # which may already be in use during this call.