about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-04-30 07:54:19 +0000
committerEric Wong <e@80x24.org>2018-05-01 10:19:17 +0000
commit6802a50bbb68dd5450749d72f053a56560c19d89 (patch)
tree84b940a63cafb9ac57c6b73ff98f4c059cfef65a /lib
parent8cc911d4ff667c3f1af28db4c565cdbe22433e34 (diff)
downloadunicorn-6802a50bbb68dd5450749d72f053a56560c19d89.tar.gz
Ruby trunk started warning about more mismatched indentations
starting around r62836.
Diffstat (limited to 'lib')
-rw-r--r--lib/unicorn/http_server.rb24
-rw-r--r--lib/unicorn/socket_helper.rb4
-rw-r--r--lib/unicorn/util.rb4
3 files changed, 16 insertions, 16 deletions
diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb
index 8674729..bbbca6c 100644
--- a/lib/unicorn/http_server.rb
+++ b/lib/unicorn/http_server.rb
@@ -553,9 +553,9 @@ class Unicorn::HttpServer
       @workers[pid] = worker
       worker.atfork_parent
     end
-    rescue => e
-      @logger.error(e) rescue nil
-      exit!
+  rescue => e
+    @logger.error(e) rescue nil
+    exit!
   end
 
   def maintain_worker_count
@@ -586,7 +586,7 @@ class Unicorn::HttpServer
       client.kgio_trywrite(err_response(code, @request.response_start_sent))
     end
     client.close
-    rescue
+  rescue
   end
 
   def e100_response_write(client, env)
@@ -669,9 +669,9 @@ class Unicorn::HttpServer
     logger.info "worker=#{worker_nr} reopening logs..."
     Unicorn::Util.reopen_logs
     logger.info "worker=#{worker_nr} done reopening logs"
-    rescue => e
-      logger.error(e) rescue nil
-      exit!(77) # EX_NOPERM in sysexits.h
+  rescue => e
+    logger.error(e) rescue nil
+    exit!(77) # EX_NOPERM in sysexits.h
   end
 
   # runs inside each forked worker, this sits around and waits
@@ -757,11 +757,11 @@ class Unicorn::HttpServer
     wpid <= 0 and return
     Process.kill(0, wpid)
     wpid
-    rescue Errno::EPERM
-      logger.info "pid=#{path} possibly stale, got EPERM signalling PID:#{wpid}"
-      nil
-    rescue Errno::ESRCH, Errno::ENOENT
-      # don't unlink stale pid files, racy without non-portable locking...
+  rescue Errno::EPERM
+    logger.info "pid=#{path} possibly stale, got EPERM signalling PID:#{wpid}"
+    nil
+  rescue Errno::ESRCH, Errno::ENOENT
+    # don't unlink stale pid files, racy without non-portable locking...
   end
 
   def load_config!
diff --git a/lib/unicorn/socket_helper.rb b/lib/unicorn/socket_helper.rb
index 9e672d9..b540302 100644
--- a/lib/unicorn/socket_helper.rb
+++ b/lib/unicorn/socket_helper.rb
@@ -100,8 +100,8 @@ module Unicorn
         log_buffer_sizes(sock, " after: ")
       end
       sock.listen(opt[:backlog])
-      rescue => e
-        Unicorn.log_error(logger, "#{sock_name(sock)} #{opt.inspect}", e)
+    rescue => e
+      Unicorn.log_error(logger, "#{sock_name(sock)} #{opt.inspect}", e)
     end
 
     def log_buffer_sizes(sock, pfx = '')
diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb
index 2f8bfeb..501930c 100644
--- a/lib/unicorn/util.rb
+++ b/lib/unicorn/util.rb
@@ -11,8 +11,8 @@ module Unicorn::Util # :nodoc:
       fp.stat.file? &&
       fp.sync &&
       (fp.fcntl(Fcntl::F_GETFL) & append_flags) == append_flags
-    rescue IOError, Errno::EBADF
-      false
+  rescue IOError, Errno::EBADF
+    false
   end
 
   def self.chown_logs(uid, gid)