This commit is contained in:
Miroslav Stampar
2025-08-14 11:05:36 +02:00
parent 2ecb9c2aa7
commit 99546c77c7
3 changed files with 4 additions and 4 deletions

View File

@@ -92,7 +92,7 @@ class HTTPSConnection(_http_client.HTTPSConnection):
break
else:
sock.close()
except (ssl.SSLError, socket.error, _http_client.BadStatusLine) as ex:
except (ssl.SSLError, socket.error, _http_client.BadStatusLine, AttributeError) as ex:
self._tunnel_host = None
logger.debug("SSL connection error occurred for '%s' ('%s')" % (_lut[protocol], getSafeExString(ex)))