about summary refs log tree commit homepage
path: root/ext
diff options
context:
space:
mode:
authorSimon Eskildsen <simon.eskildsen@shopify.com>2017-03-06 16:32:02 -0500
committerEric Wong <e@80x24.org>2017-03-07 22:43:29 +0000
commitbeaee769c6553bf4e0260be2507b8235f0aa764f (patch)
tree56b3d1904ce56bb1ddf8180cd44f076a1f0bc866 /ext
parent73e1ce827faad59bfcaff0bc758c8255a5e4f747 (diff)
downloadunicorn-ccc-tcp.tar.gz
* Use a frozen empty array and a class variable for TCP_Info to avoid
  garbage. As far as I can tell, this shouldn't result in any garbage on
  any requests (other than on the first request).
* Pass listener socket to #read to only check the client connection on
  a TCP server.
* Short circuit CLOSE_WAIT after ESTABLISHED since in my testing it's
  the most common state after ESTABLISHED, it makes the numbers
  un-ordered, though. But comment should make it OK.
* Definition of of `check_client_connection` based on whether
  Raindrops::TCP_Info is defined, instead of the class variable
  approach.
* Changed the unit tests to pass a `nil` listener.

Tested on our staging environment, and still works like a dream.

I should note that I got the idea between this patch into Puma as well!

https://github.com/puma/puma/pull/1227

[ew: squashed in temporary change for oob_gc.rb, but we'll come
 up with a different change to avoid breaking gctools
 <https://github.com/tmm1/gctools>]

Acked-by: Eric Wong <e@80x24.org>
Diffstat (limited to 'ext')
0 files changed, 0 insertions, 0 deletions