Permalink
Browse files

quiet possible IOError from SIGUSR1 (reopen logs)

It's possible for a SIGUSR1 signal to be received in the
worker immediately before calling IO.select.  In that case,
do not clutter logging with IOError and just process the
reopen log request.
  • Loading branch information...
1 parent 2cc0db7 commit 7688fe59a8a80f473b276aa1ab01ff24cab6a653 Eric Wong committed Dec 13, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/unicorn/http_server.rb
@@ -625,6 +625,7 @@ def worker_loop(worker)
rescue Errno::EBADF
nr < 0 or return
rescue => e
+ redo if nr < 0 && IOError === e
Unicorn.log_error(@logger, "listen loop error", e) if worker
end while worker
end

0 comments on commit 7688fe5

Please sign in to comment.