diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-02-04 14:30:40 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-02-09 19:50:36 -0800 |
commit | 28d571b7cca709641d964e00e6004facb6bfcc7e (patch) | |
tree | ed260a408088db92adb190d2b9eddaa6be8ab580 /lib/unicorn/tcphack.rb | |
parent | 66254b6f2b0ebb3899413b12d96614ac9318daae (diff) | |
download | unicorn-28d571b7cca709641d964e00e6004facb6bfcc7e.tar.gz |
Avoid conflicting with existing Mongrel libraries since we'll be incompatible and break things w/o disrupting Mongrel installations.
Diffstat (limited to 'lib/unicorn/tcphack.rb')
-rw-r--r-- | lib/unicorn/tcphack.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/unicorn/tcphack.rb b/lib/unicorn/tcphack.rb new file mode 100644 index 0000000..634f9dd --- /dev/null +++ b/lib/unicorn/tcphack.rb @@ -0,0 +1,18 @@ +# Copyright (c) 2005 Zed A. Shaw +# You can redistribute it and/or modify it under the same terms as Ruby. +# +# Additional work donated by contributors. See http://mongrel.rubyforge.org/attributions.html +# for more information. + + +# 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 |