diff options
author | IƱaki Baz Castillo <ibc@aliax.net> | 2009-12-28 15:46:26 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-12-28 15:57:14 -0800 |
commit | 1a0f0688bb2257c6db8e8a3f41b9a41641c2db3f (patch) | |
tree | 778e47da923a4c4a415763740c2d27e25822d1b2 | |
parent | 643994afcdbd4121c0d131a87052cdd17d40e54f (diff) | |
download | unicorn-1a0f0688bb2257c6db8e8a3f41b9a41641c2db3f.tar.gz |
When using multiple listeners, the log messages can be potentially misleading as to which listener fails to bind: Before: INFO -- : unlinking existing socket=/tmp/unicorn.sock INFO -- : listening on addr=/tmp/unicorn.sock fd=3 unicorn/socket_helper.rb:110:in `initialize': Permission denied - bind(2) (Errno::EACCES) After: INFO -- : unlinking existing socket=/tmp/openxdms.sock INFO -- : listening on addr=/tmp/openxdms.sock fd=3 FATAL -- : error adding listener addr=0.0.0.0:84 unicorn/socket_helper.rb:110:in `initialize': Permission denied - bind(2) (Errno::EACCES)
-rw-r--r-- | lib/unicorn.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 71d5994..225e00a 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -306,6 +306,9 @@ module Unicorn "(#{tries < 0 ? 'infinite' : tries} tries left)" sleep(delay) retry + rescue => err + logger.fatal "error adding listener addr=#{address}" + raise err end end |