clarify errors when listeners fail to bind
commit4239f0618c8107545fd5babd256c89ffd82553bd
authorIñaki Baz Castillo <ibc@aliax.net>
Mon, 28 Dec 2009 23:46:26 +0000 (28 15:46 -0800)
committerEric Wong <normalperson@yhbt.net>
Mon, 28 Dec 2009 23:55:25 +0000 (28 15:55 -0800)
tree458b101162db45d7319a8c393786e3dcbadec4b4
parent52eee4e424198a3c80793ee9c930fd3bb0285168
clarify errors when listeners fail to bind

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)
lib/unicorn.rb