Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit c9e6d9f5 authored by Marc Abonce Seguin's avatar Marc Abonce Seguin Committed by GitHub
Browse files

Fix Tor proxy when using httpx 0.21.x (#3165)

## What does this PR do?

This should fix #3164.
The problem is that `httpx` keeps making breaking changes to their library, so we just have to adjust the code a little bit to make it work with the new version of the library.


## Related issues
Closes  #3164
parent 0669bfd7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -167,8 +167,7 @@ class Network:
        for transport in client._mounts.values():  # pylint: disable=protected-access
            if isinstance(transport, AsyncHTTPTransportNoHttp):
                continue
            if not getattr(transport, '_pool') and getattr(transport._pool, '_rdns', False):
                result = False
            if getattr(transport, '_pool') and getattr(transport._pool, '_rdns', False):
                continue
            return False
        response = await client.get("https://check.torproject.org/api/ip", timeout=10)