romis2012 / python-socks

Core proxy client (SOCKS4, SOCKS5, HTTP) functionality for Python
Apache License 2.0
95 stars 18 forks source link

anyio.BrokenResourceError has no attribute 'strerror' #14

Closed yufengzjj closed 2 years ago

yufengzjj commented 2 years ago

in file python-socks/pythonsocks/async/anyio/_proxy.py:88,access to strerror attribute of anyio.BrokenResourceError will cause unexpected AttributeError

    except (OSError, anyio.BrokenResourceError) as e:
        await self._close()
        msg = 'Could not connect to proxy {}:{} [{}]'.format(
            self._proxy_host,
            self._proxy_port,
            e.strerror,
        )