mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-42756: Configure LMTP Unix-domain socket to use global default timeout when timeout not provided (GH-23969)
This commit is contained in:
parent
de6f20a6de
commit
3bf05327c2
4 changed files with 22 additions and 1 deletions
|
@ -1082,7 +1082,8 @@ class LMTP(SMTP):
|
|||
# Handle Unix-domain sockets.
|
||||
try:
|
||||
self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
self.sock.settimeout(self.timeout)
|
||||
if self.timeout is not socket._GLOBAL_DEFAULT_TIMEOUT:
|
||||
self.sock.settimeout(self.timeout)
|
||||
self.file = None
|
||||
self.sock.connect(host)
|
||||
except OSError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue