diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-02-05 02:34:27 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-02-09 19:50:39 -0800 |
commit | ce5868855c7bbd0aa82dcd60b2e27a3fd3d5f9fb (patch) | |
tree | 50a467be11e78fdd727f014d37e698b566990a11 /lib/unicorn.rb | |
parent | 2dddf957462f2cdbd6f141f35e0292a70b62c5a6 (diff) | |
download | unicorn-ce5868855c7bbd0aa82dcd60b2e27a3fd3d5f9fb.tar.gz |
It's really pointless to allow stdio or something similar to do any sort of buffering on a TCP socket on a Linux box where syscalls are cheap and we have TCP_CORK.
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r-- | lib/unicorn.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index b4721be..57471a4 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -196,7 +196,8 @@ module Unicorn while alive begin client = @socket.accept - + client.sync = true + if defined?($tcp_cork_opts) and $tcp_cork_opts client.setsockopt(*$tcp_cork_opts) rescue nil end |