about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/unicorn.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index e2d1ac1..f454eb7 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -488,12 +488,9 @@ module Unicorn
     # wait for a signal hander to wake us up and then consume the pipe
     # Wake up every second anyways to run murder_lazy_workers
     def master_sleep(sec)
-      begin
-        IO.select([ SELF_PIPE.first ], nil, nil, sec) or return
-        SELF_PIPE.first.read_nonblock(Const::CHUNK_SIZE, HttpRequest::BUF)
+      IO.select([ SELF_PIPE[0] ], nil, nil, sec) or return
+      SELF_PIPE[0].read_nonblock(Const::CHUNK_SIZE, HttpRequest::BUF)
       rescue Errno::EAGAIN, Errno::EINTR
-        break
-      end while true
     end
 
     def awaken_master