mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Ignore bad file descriptor while closing
This commit is contained in:
parent
4c7224e56a
commit
a7f98fd3cc
|
@ -168,7 +168,10 @@ class TcpClient:
|
||||||
__log__.info('ConnectionError "%s" while reading data', e)
|
__log__.info('ConnectionError "%s" while reading data', e)
|
||||||
self._raise_connection_reset(e)
|
self._raise_connection_reset(e)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
__log__.info('OSError "%s" while reading data', e)
|
if e.errno != errno.EBADF and self._closing_lock.locked():
|
||||||
|
# Ignore bad file descriptor while closing
|
||||||
|
__log__.info('OSError "%s" while reading data', e)
|
||||||
|
|
||||||
if e.errno in CONN_RESET_ERRNOS:
|
if e.errno in CONN_RESET_ERRNOS:
|
||||||
self._raise_connection_reset(e)
|
self._raise_connection_reset(e)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user