From 60fd965f06da1ced28463e2c13ef9c770bcc1e35 Mon Sep 17 00:00:00 2001 From: "Paul J. Dorn" Date: Tue, 23 Apr 2024 02:47:32 +0200 Subject: [PATCH] Swap error/debug severity debug message: will now sleep(1) error message: this is what went wrong --- gunicorn/sock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gunicorn/sock.py b/gunicorn/sock.py index 7700146a8..d8aa9f83e 100644 --- a/gunicorn/sock.py +++ b/gunicorn/sock.py @@ -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