Support connection timeout

This commit is contained in:
Lonami Exo
2018-10-05 13:26:44 +02:00
parent 0cc8bca098
commit db83709c6b
9 changed files with 30 additions and 22 deletions
+2 -2
View File
@@ -14,8 +14,8 @@ class ConnectionTcpFull(Connection):
super().__init__(ip, port, loop=loop)
self._send_counter = 0
async def connect(self):
await super().connect()
async def connect(self, timeout=None):
await super().connect(timeout=timeout)
self._send_counter = 0 # Important or Telegram won't reply
def _send(self, data):