[New-bugs-announce] [issue35590] logging.handlers.SysLogHandler with STREAM connects in constructor without timeout
jso2460
report at bugs.python.org
Wed Dec 26 06:00:53 EST 2018
New submission from jso2460 <python at icebolt.info>:
logging.handlers.SysLogHandler in __init__ contains the following code, where socket is created and then connected right away. This seem to provide no way to specify a connection timeout for the socket being created.
sock = socket.socket(af, socktype, proto)
if socktype == socket.SOCK_STREAM:
sock.connect(sa)
I believe to add an argument to specify the optional timeout would be appreciated, i.e., optionally calling sock.settimeout(..), something like:
sock = socket.socket(af, socktype, proto)
if timeout:
sock.settimeout(timeout)
if socktype == socket.SOCK_STREAM:
sock.connect(sa)
----------
messages: 332536
nosy: jso2460
priority: normal
severity: normal
status: open
title: logging.handlers.SysLogHandler with STREAM connects in constructor without timeout
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35590>
_______________________________________
More information about the New-bugs-announce
mailing list