diff options
-rw-r--r-- | lib/unicorn.rb | 3 | ||||
-rw-r--r-- | lib/unicorn/socket.rb | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 4e82ec6..6313f16 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -403,7 +403,8 @@ module Unicorn # once a client is accepted, it is processed in its entirety here # in 3 easy steps: read request, call app, write app response def process_client(client) - client.nonblock = false + # one syscall less than "client.nonblock = false": + client.fcntl(Fcntl::F_SETFL, File::RDWR) env = @request.read(client) app_response = @app.call(env) HttpResponse.write(client, app_response) diff --git a/lib/unicorn/socket.rb b/lib/unicorn/socket.rb index f0c41cf..5a3bfd7 100644 --- a/lib/unicorn/socket.rb +++ b/lib/unicorn/socket.rb @@ -1,5 +1,4 @@ require 'socket' -require 'io/nonblock' class UNIXSocket UNICORN_PEERADDR = '127.0.0.1'.freeze |