diff options
author | Eric Wong <e@80x24.org> | 2015-11-14 02:47:24 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-11-18 02:20:25 +0000 |
commit | 70c976bdd85bb8515fea01d6ad6074ef472fc2e0 (patch) | |
tree | 51230dc24bb183176b932e0d38e181869b5485e7 /lib/rainbows/epoll | |
parent | 9c9e3949b2ef2f299ff1590d23aa4d053b60a2fd (diff) | |
download | rainbows-70c976bdd85bb8515fea01d6ad6074ef472fc2e0.tar.gz |
Unicorn 5 removes some constants we were using, and constant lookups + inline caching are waste of time anyways on newer Rubies with the opt_str_freeze bytecode instruction. This may reduce performance for folks on older Rubies (probably not noticeable); but improves performance for folks on newer Rubies.
Diffstat (limited to 'lib/rainbows/epoll')
-rw-r--r-- | lib/rainbows/epoll/client.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rainbows/epoll/client.rb b/lib/rainbows/epoll/client.rb index 65fcb3e..2d95a99 100644 --- a/lib/rainbows/epoll/client.rb +++ b/lib/rainbows/epoll/client.rb @@ -63,8 +63,8 @@ module Rainbows::Epoll::Client end def app_call input # called by on_read() - @env[RACK_INPUT] = input - @env[REMOTE_ADDR] = kgio_addr + @env['rack.input'] = input + @env['REMOTE_ADDR'] = kgio_addr @hp.hijack_setup(@env, self) status, headers, body = APP.call(@env.merge!(RACK_DEFAULTS)) return hijacked if @hp.hijacked? @@ -93,7 +93,7 @@ module Rainbows::Epoll::Client Rainbows::Epoll::ResponsePipe).new(io, self, body) return @wr_queue << pipe if @wr_queue[0] stream_pipe(pipe) or return - @wr_queue[0] or @wr_queue << Z + @wr_queue[0] or @wr_queue << ''.freeze end def ev_write_response(status, headers, body, alive) @@ -120,7 +120,7 @@ module Rainbows::Epoll::Client want_more else # pipelined request (already in buffer) - on_read(Z) + on_read(''.freeze) return if @wr_queue[0] || closed? return hijacked if @hp.hijacked? close if :close == @state |