Permalink
Browse files

cleanup exception handling on SIGUSR1

No need to duplicate logic here
  • Loading branch information...
1 parent 7688fe5 commit 68e8d3726542c549f291f82bdcb751d372c34597 Eric Wong committed Dec 13, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/unicorn/http_server.rb
@@ -622,10 +622,8 @@ def worker_loop(worker)
# timeout used so we can detect parent death:
worker.tick = Time.now.to_i
ret = IO.select(l, nil, SELF_PIPE, @timeout) and ready = ret[0]
- rescue Errno::EBADF
- nr < 0 or return
rescue => e
- redo if nr < 0 && IOError === e
+ redo if nr < 0 && (Errno::EBADF === e || IOError === e) # reopen logs
Unicorn.log_error(@logger, "listen loop error", e) if worker
end while worker
end

0 comments on commit 68e8d37

Please sign in to comment.