diff options
author | Eric Wong <e@80x24.org> | 2017-03-08 00:52:23 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-03-08 04:57:43 +0000 |
commit | 8ce88a3756b110e5e3001f640ebd53a5b11d8c65 (patch) | |
tree | aa7a0eef9bf9315406e323829f3f6fb110254b3a /lib/unicorn/http_server.rb | |
parent | 77b9ec2aa017cabe9babbbcba4f0cf5cea5f7aca (diff) | |
download | unicorn-8ce88a3756b110e5e3001f640ebd53a5b11d8c65.tar.gz |
We can force kgio_tryaccept to return an internal class for TCP objects by subclassing Kgio::TCPServer. This avoids breakage in any unfortunate projects which depend on our undocumented internal APIs, such as gctools <https://github.com/tmm1/gctools>
Diffstat (limited to 'lib/unicorn/http_server.rb')
-rw-r--r-- | lib/unicorn/http_server.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 2aa1072..c2086cb 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -558,8 +558,8 @@ class Unicorn::HttpServer # 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, listener) - status, headers, body = @app.call(env = @request.read(client, listener)) + def process_client(client) + status, headers, body = @app.call(env = @request.read(client)) begin return if @request.hijacked? @@ -655,7 +655,7 @@ class Unicorn::HttpServer # Unicorn::Worker#kgio_tryaccept is not like accept(2) at all, # but that will return false if client = sock.kgio_tryaccept - process_client(client, sock) + process_client(client) nr += 1 worker.tick = time_now.to_i end |