From ddcea26976f24dda8a0cd65022065100bb40fbb7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 14 Jun 2011 23:49:57 +0000 Subject: [PATCH] http_server: small cleanups for attr assignments ivar references using @ are slightly faster than calling attribute methods. --- lib/unicorn/http_server.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index d0a8dfc3..f07a3fc4 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -281,8 +281,7 @@ class Unicorn::HttpServer logger.info "master process ready" # test_exec.rb relies on this message if @ready_pipe @ready_pipe.syswrite($$.to_s) - @ready_pipe.close rescue nil - @ready_pipe = nil + @ready_pipe = @ready_pipe.close rescue nil end begin reap_all_workers @@ -488,7 +487,7 @@ class Unicorn::HttpServer def after_fork_internal @ready_pipe.close if @ready_pipe - self.ready_pipe = nil # XXX Rainbows! compat, change for Unicorn 4.x + @ready_pipe = nil srand # http://redmine.ruby-lang.org/issues/4338 # The OpenSSL PRNG is seeded with only the pid, and apps with frequently -- 2.11.4.GIT