Skip to content

Commit

Permalink
Swap error/debug severity
Browse files Browse the repository at this point in the history
debug message: will now sleep(1)
error message: this is what went wrong
  • Loading branch information
pajod committed Apr 23, 2024
1 parent 5b68c17 commit 60fd965
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gunicorn/sock.py
Expand Up @@ -188,10 +188,10 @@ def create_sockets(conf, log, fds=None):
log.error("Connection in use: %s", str(addr))
if e.args[0] == errno.EADDRNOTAVAIL:
log.error("Invalid address: %s", str(addr))
msg = "connection to {addr} failed: {error}"
log.error(msg.format(addr=str(addr), error=str(e)))
if i < 5:
msg = "connection to {addr} failed: {error}"
log.debug(msg.format(addr=str(addr), error=str(e)))
log.error("Retrying in 1 second.")
log.debug("Retrying in 1 second.")
time.sleep(1)
else:
break
Expand Down

0 comments on commit 60fd965

Please sign in to comment.