Skip to content

Commit

Permalink
logs: blame WSL2 for unix socket bind fail
Browse files Browse the repository at this point in the history
  • Loading branch information
pajod committed Aug 16, 2024
1 parent 13f54ed commit 7475a75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gunicorn/sock.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import errno
import os
import platform
import socket
import ssl
import stat
Expand Down Expand Up @@ -189,6 +190,10 @@ def create_sockets(conf, log, fds=None):
log.error("Invalid address: %s", str(addr))
msg = "connection to {addr} failed: {error}"
log.error(msg.format(addr=str(addr), error=str(e)))
if e.errno == errno.EOPNOTSUPP: # (sic!)
if "microsoft" in platform.release().lower():
log.info("hint: mixing win32 filesystems and unix "
"sockets is not supported.")
if i < 5:
log.debug("Retrying in 1 second.")
time.sleep(1)
Expand Down

0 comments on commit 7475a75

Please sign in to comment.