about summary refs log tree commit homepage
path: root/lib/mongrel/tcphack.rb
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-03-09 04:38:02 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-03-09 04:38:02 +0000
commitdb1ec5f513fabff9b8edcaf15548e93c35fc96d5 (patch)
tree9562f538409cb0641da675b574fdfdfeb07da344 /lib/mongrel/tcphack.rb
parent97502ebea97890d3b49427ba7381622e2bb4fe5e (diff)
downloadunicorn-db1ec5f513fabff9b8edcaf15548e93c35fc96d5.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@89 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel/tcphack.rb')
-rw-r--r--lib/mongrel/tcphack.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/mongrel/tcphack.rb b/lib/mongrel/tcphack.rb
new file mode 100644
index 0000000..3f769b2
--- /dev/null
+++ b/lib/mongrel/tcphack.rb
@@ -0,0 +1,12 @@
+
+# A modification proposed by Sean Treadway that increases the default accept
+# queue of TCPServer to 1024 so that it handles more concurrent requests.
+class TCPServer
+   def initialize_with_backlog(*args)
+     initialize_without_backlog(*args)
+     listen(1024)
+   end
+
+   alias_method :initialize_without_backlog, :initialize
+   alias_method :initialize, :initialize_with_backlog
+end