From af92742143605e095d080e776579852394393937 Mon Sep 17 00:00:00 2001 From: zz Date: Mon, 19 Jun 2017 13:03:11 +0200 Subject: [PATCH] parse_syslog_address: unix domain socket type default None, since SOCK_STREAM may not be appropriate --- gunicorn/glogging.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gunicorn/glogging.py b/gunicorn/glogging.py index 7d1a94c3..3b007a86 100644 --- a/gunicorn/glogging.py +++ b/gunicorn/glogging.py @@ -119,10 +119,12 @@ class SafeAtoms(dict): 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]