mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Merge pull request #1547 from guj-zz/syslog_socktype
parse_syslog_addr sock_type default
This commit is contained in:
commit
fc0d973416
@ -119,10 +119,12 @@ class SafeAtoms(dict):
|
|||||||
|
|
||||||
def parse_syslog_address(addr):
|
def parse_syslog_address(addr):
|
||||||
|
|
||||||
|
# unix domain socket type depends on backend
|
||||||
|
# SysLogHandler will try both when given None
|
||||||
if addr.startswith("unix://"):
|
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)
|
parts = addr.split("#", 1)
|
||||||
if len(parts) == 2:
|
if len(parts) == 2:
|
||||||
addr = parts[0]
|
addr = parts[0]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user