diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-02-06 18:00:08 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-02-09 19:52:09 -0800 |
commit | 1fe42f0f8e7f0902eb02860fb098cbd73ddf4e5d (patch) | |
tree | 8ffd8a58ea498fc581c5371a991a352b60f94102 /lib/unicorn/socket.rb | |
parent | 9d92bb90f0d0a317834a51a01c4271f68697f956 (diff) | |
download | unicorn-1fe42f0f8e7f0902eb02860fb098cbd73ddf4e5d.tar.gz |
Unicorn is only designed for fast internal networks (and loopback); so avoid wasting time with userspace I/O buffering. This should not significantly affect userspace threading on 1.8 in case your application itself is running threads for some (masochistic) reason as long as the clients you're serving directly with Unicorn are fast.
Diffstat (limited to 'lib/unicorn/socket.rb')
-rw-r--r-- | lib/unicorn/socket.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/unicorn/socket.rb b/lib/unicorn/socket.rb index 1f0f03f..3f567c6 100644 --- a/lib/unicorn/socket.rb +++ b/lib/unicorn/socket.rb @@ -28,6 +28,7 @@ class Socket def unicorn_client_init self.sync = true + self.nonblock = false self.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1) if defined?(TCP_NODELAY) self.setsockopt(SOL_TCP, TCP_CORK, 1) if defined?(TCP_CORK) end |