Skip to content

Commit

Permalink
Merge pull request benoitc#1547 from guj-zz/syslog_socktype
Browse files Browse the repository at this point in the history
parse_syslog_addr sock_type default
  • Loading branch information
tilgovi authored Aug 7, 2017
2 parents fc1e7a8 + 5b0ae52 commit fc0d973
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gunicorn/glogging.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@ def __getitem__(self, k):

def parse_syslog_address(addr):

# unix domain socket type depends on backend
# SysLogHandler will try both when given None
if addr.startswith("unix://"):
sock_type = socket.SOCK_STREAM
sock_type = None

# are we using a different socket type?
# set socket type only if explicitly requested
parts = addr.split("#", 1)
if len(parts) == 2:
addr = parts[0]
Expand Down

0 comments on commit fc0d973

Please sign in to comment.