about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-04-26 00:04:13 -0700
committerEric Wong <normalperson@yhbt.net>2009-04-26 12:09:30 -0700
commit889da081e87c0baf55ae45a3095e07184e6418d7 (patch)
tree362552e093c5b43cf48be75db9d67aeb3fb18605
parentc8287ae9b5ee5365aee8d350ac0c5cbc5870fd71 (diff)
downloadunicorn-889da081e87c0baf55ae45a3095e07184e6418d7.tar.gz
No need to use ensure since process_client will handle errors
regardless.  And if not, there's a bug on our side that needs to
fixed.
-rw-r--r--lib/unicorn.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index 54e2bc0..05866df 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -504,13 +504,12 @@ module Unicorn
                 next
               end
               process_client(client)
+              alive.chmod(nr += 1)
             rescue Errno::ECONNABORTED
               # client closed the socket even before accept
               client.close rescue nil
-            ensure
-              alive.chmod(nr += 1) if client
-              break if nr < 0
             end
+            break if nr < 0
           end
           client = nil