proxywatchd: ensure socket cleanup before SSL fallback
All checks were successful
CI / syntax-check (push) Successful in 6s
CI / memory-leak-check (push) Successful in 14s

This commit is contained in:
Username
2025-12-25 19:13:47 +01:00
parent b41d077905
commit 9ba965c87f

View File

@@ -1463,6 +1463,11 @@ class TargetTestJob():
return None, proto, duration, torhost, srvname, 0, use_ssl, 'ssl_mitm'
elif et == rocksock.RS_ET_SSL and not ssl_only_check:
# SSL failed but proxy protocol worked - fallback to HTTP
# sock already disconnected above, but ensure cleanup
try:
sock.disconnect()
except Exception:
pass
if config.watchd.debug:
_log('SSL failed, fallback to HTTP: %s://%s:%d' % (proto, ps.ip, ps.port), 'debug')
try: