mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-03 05:04:33 +03:00
Safer check to determine whether sockets are connected (#427)
This commit is contained in:
parent
99512875a2
commit
84d48ef7bf
|
@ -59,7 +59,7 @@ class TcpClient:
|
|||
raise
|
||||
|
||||
def _get_connected(self):
|
||||
return self._socket is not None
|
||||
return self._socket is not None and self._socket.fileno() > 0
|
||||
|
||||
connected = property(fget=_get_connected)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user