mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-03 10:40:16 +00:00
Safer check to determine whether sockets are connected (#427)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user