Merge pull request #3191 from pajod/patch-severity

logging: swap error/debug severity on socket creation failure
This commit is contained in:
Benoit Chesneau 2024-08-07 19:25:31 +02:00 committed by GitHub
commit 77b65a0934
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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