This commit is contained in:
Your Name 2026-03-30 10:59:44 +02:00
parent 0ed5cd2cfd
commit c310c695a1
3 changed files with 4 additions and 4 deletions

View file

@ -1992,7 +1992,7 @@ def _cleanupEnvironment():
Cleanup environment (e.g. from leftovers after --shell).
"""
if issubclass(_http_client.socket.socket, socks.socksocket):
if getattr(_http_client.socket, "socket", None) is not getattr(socks, "_orgsocket", None):
socks.unwrapmodule(_http_client)
if hasattr(socket, "_ready"):