mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 03:00:15 +03:00
More safe check the state of connection
This commit is contained in:
parent
99512875a2
commit
128caddcae
|
@ -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