From db1ec5f513fabff9b8edcaf15548e93c35fc96d5 Mon Sep 17 00:00:00 2001 From: zedshaw Date: Thu, 9 Mar 2006 04:38:02 +0000 Subject: Fixed and tested with edge rails and works such that mephisto doesn't report closed log files from daemonize. Added a little hack from Sean Treadway that increases the tcp accept queue (needs win32 testing). git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@89 19e92222-5c0b-0410-8929-a290d50e31e9 --- lib/mongrel/tcphack.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/mongrel/tcphack.rb (limited to 'lib/mongrel/tcphack.rb') 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 -- cgit v1.2.3-24-ge0c7