mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-05-29 18:53:06 +03:00
Except OSError with errno.WSAEACCES when connecting
"OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions."
This commit is contained in:
parent
cf21808118
commit
2ffe2b71dc
|
@ -73,7 +73,8 @@ class TcpClient:
|
||||||
# There are some errors that we know how to handle, and
|
# There are some errors that we know how to handle, and
|
||||||
# the loop will allow us to retry
|
# the loop will allow us to retry
|
||||||
if e.errno in (errno.EBADF, errno.ENOTSOCK, errno.EINVAL,
|
if e.errno in (errno.EBADF, errno.ENOTSOCK, errno.EINVAL,
|
||||||
errno.ECONNREFUSED):
|
errno.ECONNREFUSED, # Windows-specific follow
|
||||||
|
getattr(errno, 'WSAEACCES', None)):
|
||||||
# Bad file descriptor, i.e. socket was closed, set it
|
# Bad file descriptor, i.e. socket was closed, set it
|
||||||
# to none to recreate it on the next iteration
|
# to none to recreate it on the next iteration
|
||||||
self._socket = None
|
self._socket = None
|
||||||
|
|
Loading…
Reference in New Issue
Block a user