Skip to content

Commit c2cd94f

Browse files
committed
Add host:port printing to SSL/TLS connection errors
1 parent dc994aa commit c2cd94f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/request/httpshandler.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def create_sock():
8686
sock.close()
8787
except (ssl.SSLError, socket.error, _http_client.BadStatusLine) as ex:
8888
self._tunnel_host = None
89-
logger.debug("SSL connection error occurred for '%s' ('%s')" % (_lut[protocol], getSafeExString(ex)))
89+
logger.debug("SSL connection error occurred for '%s' on '%s:%d' ('%s')" % (_lut[protocol], self.host, self.port, getSafeExString(ex)))
9090

9191
if kb.tlsSNI.get(self.host) is None:
9292
kb.tlsSNI[self.host] = success
@@ -106,7 +106,7 @@ def create_sock():
106106
sock.close()
107107
except (ssl.SSLError, socket.error, _http_client.BadStatusLine) as ex:
108108
self._tunnel_host = None
109-
logger.debug("SSL connection error occurred for '%s' ('%s')" % (_lut[protocol], getSafeExString(ex)))
109+
logger.debug("SSL connection error occurred for '%s' on '%s:%d' ('%s')" % (_lut[protocol], self.host, self.port, getSafeExString(ex)))
110110

111111
if not success:
112112
errMsg = "can't establish SSL connection"

0 commit comments

Comments
 (0)