about summary refs log tree commit homepage
path: root/lib/unicorn.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r--lib/unicorn.rb3
1 files changed, 2 insertions, 1 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)