mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Don't send pings unless the connection is made
This will hopefully avoid batching tens of ping requests which we don't care about their results.
This commit is contained in:
@@ -128,6 +128,13 @@ class MTProtoSender:
|
||||
def is_connected(self):
|
||||
return self._user_connected
|
||||
|
||||
def _transport_connected(self):
|
||||
return (
|
||||
not self._reconnecting
|
||||
and self._connection is not None
|
||||
and self._connection._connected
|
||||
)
|
||||
|
||||
async def disconnect(self):
|
||||
"""
|
||||
Cleanly disconnects the instance from the network, cancels
|
||||
|
Reference in New Issue
Block a user