about summary refs log tree commit homepage
diff options
context:
space:
mode:
-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