From 4302de0227e97b5e436b8a58ef47810194b7d973 Mon Sep 17 00:00:00 2001 From: Jim Menard Date: Tue, 10 Feb 2009 13:32:40 -0500 Subject: [PATCH] set TCP_NODELAY for db sockets. --- lib/mongo/db.rb | 1 + 1 file changed, 1 insertion(+) 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.